LiveWire Network Peer Answers Peer Support Teen Forums Tech Forums College Forums 337 users online 166215 members 387 active today Advertise Here Sign In
TeenCollegeTechPhotos | Quizzes | LiveSecret | Video | Dictionary | News | FAQ
You have 1 new message.
Emergency Help
Until you sign up you can't do much. Yes, it's free.

Sign Up Now
Membername:
Password:
Already have an account?
Invite Friends
Active Members
Groups
Contests
Moderators
2 online / 44 MPM
Fresh Topics
  LiveWire / Technical Forums / Programming & Application Development / Viewing Topic

enumchildwindows, getwindow (vb.net)
within tab controls
Replies: 0Last Post Dec. 30, 2007 2:08pm by j3100
Single page for this topic Email Print Favorite
( j3100 )


Executive
Reply
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
Single page for this topic Email Print Favorite

Quick Reply

You are signed in as our guest.

Looking for something else?
 

  LiveWire / Technical Forums / Programming & Application Development / Viewing Topic