|
Until you sign up you can't do much. Yes, it's free.
|
|
|
|
|
|
|
 | / / / Viewing Topic
|  |
|
|
enumchildwindows, getwindow (vb.net) |
| within tab controls |
|
|
|
|
Replies: 0 Last Post Dec. 30, 2007 2:08pm by j3100
|
|
|
|
|
( j3100 )
Executive
|
I'm trying to get handles for buttons, textboxes and other controls inside tabbed boxes of a 3rd party windows form, but those functions listed above do not seem to be able to "see" inside the tab controls. Here is some code that I have now: | Code: | Private Sub btnPress_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnPress.Click Dim hwnd As IntPtr hwnd = FindWindow(vbNullString, "Joe") Dim ptrChildWindows() As IntPtr = GetWindows(hwnd) For iCounter As Integer = 0 To ptrChildWindows.Length - 1 'grab the current handle to process... Dim ptrCurrent As IntPtr = ptrChildWindows(iCounter) 'get the window text... Dim sText As String = GetWindowText(ptrCurrent) TextBox2.AppendText(sText & vbCrLf) 'check to see if this is the button we are looking for... If sText = "Click" Then 'click the button to close the dialog... ClickButton(ptrCurrent) 'done deal... Exit For End If Next End Sub | Does anybody know of a way to get the child handles that are inside the tab control? It get's handles for controls that are outside the tab just fine.
|
2:08 pm on Dec. 30, 2007 | Joined May 2004 | 326 Days Active Join to learn more about j3100 California, United States | Straight Male | 123 Posts | 3409 Points
|
|
| |
|
|
|
| Looking for something else?
|
|
|
|
|
|
 | / / / Viewing Topic |  |
|