I am using EnumWindows and EnumChildWindows to get the handles of all running applications.
Say I am looking for a specific ClassName(CN) or MainWindowTitle(MWT) and once I find it I want to iterate through the controls of that specific form. How can I do this?
Basically what I am looking to do is launch an application, wait for the CN or MWT to show up, change the selection in a specific dropdown combo box, click a button (which launches a new form), wait for its CN or MWT to show up, fill in a few textboxes, and click another button.
I obviously don't expect all that code, but if I can get the control handles and maybe an example of how to do any function (click a button) I should be able to figure out the rest.
I tried uploading a 2MB .Zip file of my project but needless to say just about every file extension wasn't in the list.
Added a .JPG, thought it might help. The code snippet is what populates 'Form1' of the .JPG
Private Sub RadButton1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles RadButton1.Click
Dim winEnum As New WindowsEnumerator
Dim winList As New System.Collections.Generic.List(Of WindowsEnumTest.ApiWindow)
Dim childList As New System.Collections.Generic.List(Of WindowsEnumTest.ApiWindow)
winList = winEnum.GetTopLevelWindows()
For Each apiWin As WindowsEnumTest.ApiWindow In winList
RadTextBox1.Text += apiWin.MainWindowTitle + vbCrLf
RadTextBox2.Text += apiWin.ClassName + vbCrLf
childList = winEnum.GetChildWindows(apiWin.hWnd)
For Each apiChild As WindowsEnumTest.ApiWindow In childList
RadTextBox3.Text += apiWin.MainWindowTitle + ":" + apiChild.MainWindowTitle + vbCrLf