Zexor
Well-known member
- Joined
- Nov 28, 2008
- Messages
- 520
- Programming Experience
- 3-5
I am trying to find the handle of the child window for the Yes button in the User Account Control window so i can click it. This window has a structure with a few child windows with the same name.
There are multiple CtrNotifySink with its own Button child window or other child windows. How do i search thru the different CtrNotifySink window to find the one that contain the Yes button so i can send a click to it?
I do need to find it before i can send a click, right? because i try just sending it to the main window with sendmessage and nothing happen.
I even try sending it directly to the handle found by spy++ of the yes button with bm click but nothing happen
VB.NET:
Dim hwnd As IntPtr = FindWindow(Nothing, "User Account Control")
Dim hwnd2 As IntPtr = FindWindowEx(hwnd, 0, "DirectUIHWND", vbNullString)
Dim hwnd3 As IntPtr = FindWindowEx(hwnd2, 0, "CtrlNotifySink", vbNullString)
Dim hwnd4 As IntPtr = FindWindowEx(hwnd3, 0, "Button", "&Yes")
I do need to find it before i can send a click, right? because i try just sending it to the main window with sendmessage and nothing happen.
I even try sending it directly to the handle found by spy++ of the yes button with bm click but nothing happen
Last edited: