Results 1 to 2 of 2

Thread: [VB/API] - On Top

  1. #1

    Thread Starter
    Supreme User Madboy's Avatar
    Join Date
    Oct 2003
    Location
    England
    Posts
    3,253

    [VB/API] - On Top

    VB Code:
    1. Option Explicit
    2.  
    3. Private Const HWND_NOTOPMOST = -2
    4. Private Const HWND_TOPMOST = -1
    5. Private Const SWP_NOMOVE = &H2
    6. Private Const SWP_NOSIZE = &H1
    7.  
    8. Private Declare Function SetWindowPos Lib "user32" (ByVal hWnd As Long, ByVal hWndInsertAfter As Long, ByVal X As Long, ByVal Y As Long, ByVal cx As Long, ByVal cy As Long, ByVal wFlags As Long) As Long
    9.  
    10. Public Function MakeWindowAlwaysTop(byRef hWnd As Long)
    11.     SetWindowPos hWnd, HWND_TOPMOST, 0, 0, 0, 0, SWP_NOMOVE + SWP_NOSIZE
    12. End Function
    13.  
    14. Public Function MakeWindowNotTop(ByRef hWnd As Long)
    15.     SetWindowPos hWnd, HWND_NOTOPMOST, 0, 0, 0, 0, SWP_NOMOVE + SWP_NOSIZE
    16. End Function

  2. #2
    Junior Member
    Join Date
    Dec 2005
    Posts
    29

    Re: [VB/API] - On Top

    thanks very much

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