*EDIT*
ok i figured out what was causing the problem but maybe someone could still explain to me why. i took out the Auto in the declaration then it worksso why does that matter???
**********************************
i'm using the FindWindowEx as the following
VB Code:
Public Declare Auto Function FindWindowEx Lib "user32" Alias "FindWindowExA" _ (ByVal hWnd1 As IntPtr, _ ByVal hWnd2 As IntPtr, _ ByVal lpsz1 As String, _ ByVal lpsz2 As String) As IntPtr
I know the classname and the caption of the window i'm trying to get and i'm using the following code, but it's returning zero. accroding to what i saw on different site this should work for getting the window's handle. so my question is what am i doing wrong???![]()
VB Code:
HSEstimateMainWinHWnd = WinAPI.FindWindowEx(IntPtr.Zero, IntPtr.Zero, "ThunderRT6MDIForm", _ "Hendrick Manufacturing Order Estimating System")






Reply With Quote