|
-
Jun 6th, 2001, 10:07 AM
#1
Thread Starter
Junior Member
FindWindowEx
I'm trying to set the child window of an application active. The child window is a window of an application that I did not create. What is the proper syntax for the function? Here is my code....
Private Declare Function FindWindowEx Lib "user32" Alias "FindWindowExA" (ByVal hWnd1 As Long, ByVal hWnd2 As Long, ByVal lpsz1 As String, ByVal lpsz2 As String) As Long
Private Declare Function Putfocus Lib "user32" Alias "SetFocus" (ByVal hwnd As Long) As Long
Private Sub Command1_Click()
Dim InvApp As Inventor.Application
Dim Handle As Variant
Set InvApp = GetObject(, "Inventor.Application")
AppActivate InvApp.Caption, True
Handle = FindWindowEx(InvApp.MainFrameHWND, vbNullString, "#32270", vbNullString)
Putfocus (Handle)
End Sub
Thanks,
Ryan
-
Jun 6th, 2001, 11:02 AM
#2
VB Code:
hParent = FindWindowEx(0, 0, "ClassName", "Title")
hChild = FindwindowEx(hParent, 0, "ClassName", "Title"
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|