Quantcast
Channel: VBForums - Visual Basic .NET
Viewing all articles
Browse latest Browse all 27424

FindWindowEx isn't working

$
0
0
Hi all,

how can I retrieve hadle of child window" ?
I have parent window -> child window with buttons ...

Code:

Quote:

Private Declare Auto Function FindWindow Lib "user32" _
(ByVal ClassName As String, ByVal WindowTitle As String) As IntPtr

Private Declare Auto Function FindWindowEx Lib "user32" _
(ByVal parentHandle As IntPtr, ByVal childAfter As IntPtr, _
ByVal ClassName As String, ByVal WindowTitle As String) As IntPtr


Private Declare Auto Function SendMessage Lib "user32.dll" (ByVal hWnd As IntPtr, ByVal msg As Integer, _
ByVal wParam As Integer, ByVal lParam As IntPtr) As IntPtr

Private Declare Auto Function PostMessage Lib "user32.dll" (ByVal hWnd As IntPtr, ByVal msg As Integer, _
ByVal wParam As Integer, ByVal lParam As IntPtr) As IntPtr


Const WM_COMMAND As Integer = &H111

Dim ParentWndHandle As IntPtr
ParentWndHandle = FindWindow("GLBSInstall", "Tarief van invoerrechten")
MsgBox(ParentWndHandle)

Dim ChildWndHandle As IntPtr
ChildWndHandle = FindWindowEx(ParentWndHandle, 0, "GLBSWizard", "Installatie van Tarief van invoerrechten")
MsgBox(ChildWndHandle )

.............. Here I'm always getting 0 :-( ..............

Dim ChildWndHandle1 as IntPtr
ChildWndHandle1 = FindWindowEx(ChildWndHandle , IntPtr.Zero, "Button", "&Next")

SendMessage(ChildWndHandle1, WM_COMMAND, &H43, ChildWndHandle1)
Thank You

Viewing all articles
Browse latest Browse all 27424

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>