LiveWire Network Peer Answers Peer Support Teen Forums Tech Forums College Forums 413 users online 225632 members 569 active today Advertise Here Sign In
TeenCollegeTechPhotos | Quizzes | LiveSecret | Memberlist | Dictionary | News | FAQ
Member Spotlight
SophFairy
Peeves: illiterate folk.
Mood: Nervous
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 / 39 MPM
Fresh Topics
  LiveWire / Technical Forums / Programming & Application Development / Adding Reply

Adding Reply
Archived Topic: It will not be bumped to the top of the forum.
Topic enumchildwindows, getwindow (vb.net)
Membername   Not a member? Sign Up Free (takes 20 seconds)
Password   Forgotten your password?
Post

Font:   Size:   Color:

FAQ Keyword Search:
Post Options
Favorites Manager
Notify me of new replies to this topic by email
Notify me of new replies to this topic by private message
Original Post
j3100 Posted at 2:08 pm on Dec. 30, 2007
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.

Replies
There are no replies to this topic.