Results 1 to 2 of 2

Thread: FindWindowEx

  1. #1

    Thread Starter
    Junior Member
    Join Date
    May 2001
    Location
    canada
    Posts
    22

    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

  2. #2
    Megatron
    Guest
    VB Code:
    1. hParent = FindWindowEx(0, 0, "ClassName", "Title")
    2. 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
  •  



Click Here to Expand Forum to Full Width