|  |  | 
              
              | 
                  | Title | Show a form without activating it | 
|---|
 | Keywords | form, activate, show | 
|---|
 | Categories | Controls, 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 |  |  |  |   |  |  |  |  |