Home
Search
 
What's New
Index
Books
Links
Q & A
Newsletter
Banners
 
Feedback
Tip Jar
 
 
 
 
 
 
 
 
Old Pages
 
Old Index
Site Map
What's New
 
Books
How To
Tips & Tricks
Tutorials
Stories
Performance
Essays
Links
Q & A
New in VB6
Free Stuff
Pictures
 
 
 
TitleShow a form without activating it
Keywordsform, activate, show
CategoriesControls, API
 
Sometimes it is handy to display a form without activating it. For example, you can display extra information without removing the focus from the user's current form.

To do this, use the ShowWindow API function.

 
Private Sub cmdShowDetails_Click()
    ' Position the detail form under the main form.
    Form2.Move Form1.Left, Form1.Top + Form1.Height, _
        Form1.Width

    ShowWindow Form2.hwnd, SW_SHOWNOACTIVATE
End Sub
 
 
Copyright © 1997-2003 Rocky Mountain Computer Consulting, Inc.   All rights reserved.
  Updated