Results 1 to 2 of 2

Thread: how to identify current child window?

  1. #1

    Thread Starter
    New Member
    Join Date
    Feb 2001
    Posts
    13
    As suggested by Megatron in
    http://forums.vb-world.net/showthrea...threadid=57651

    To set form2 to as a child form of picture1, Use

    Code:
    Private Declare Function SetParent Lib "user32" (ByVal hWndChild As Long, ByVal hWndNewParent As Long) As Long
    
    Private Sub Form_Load()
        Form2.Show
        SetParent Form2.hWnd, Picture1.hWnd
    End Sub
    Now Supposed I have set form2, form3 and form4 as child window of picture1. Latter on I would like to identify which child form is currently displayed one. Any suggestion?

    Thanks for help

  2. #2
    Guest
    Try using the GetActiveWindow API function.


    Code:
    Private Declare Function GetActiveWindow Lib "user32" () As Long

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