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
 
 
 
TitleKeep an MDI form on top of other programs
Keywordsform, top, on top, topmost, ontop
CategoriesAPI, Tips and Tricks, Controls
 
Use the SetWindowPos API function to make the window a topmost window.
 
Private Sub OnTopCheck_Click()
    If OnTopCheck.Value = vbChecked Then
        SetWindowPos MDIForm1.hwnd, _
            HWND_TOPMOST, 0, 0, 0, 0, _
            SWP_NOMOVE + SWP_NOSIZE
    Else
        SetWindowPos MDIForm1.hwnd, _
            HWND_NOTOPMOST, 0, 0, 0, 0, _
            SWP_NOMOVE + SWP_NOSIZE
    End If
End Sub
 
 
Copyright © 1997-2003 Rocky Mountain Computer Consulting, Inc.   All rights reserved.
  Updated