Home
Search
 
What's New
Index
Books
Links
Q & A
Newsletter
Banners
 
Feedback
Tip Jar
 
 
 
 
500MB 27GB Web Hosting - $9.95/Month
 
 
 
 
 
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 a form on top of others
Keywordsform, top, on top, topmost, ontop
CategoriesAPI, Tips and Tricks
 
Use the API SetWindowPos to keep the form on top or not.
 
' Make the form topmost or not.
Private Sub SetOnTop(Optional ByVal on_top As Boolean = _
    True)
    If on_top Then
        SetWindowPos hwnd, _
            HWND_TOPMOST, 0, 0, 0, 0, _
            SWP_NOMOVE + SWP_NOSIZE
    Else
        SetWindowPos hwnd, _
            HWND_NOTOPMOST, 0, 0, 0, 0, _
            SWP_NOMOVE + SWP_NOSIZE
    End If
End Sub
 
Formatted by Neil Crosby
 
 
Copyright © 1997-2003 Rocky Mountain Computer Consulting, Inc.   All rights reserved.
  Updated