Results 1 to 3 of 3

Thread: Keep window on top

  1. #1

    Thread Starter
    Member
    Join Date
    Jan 2000
    Location
    derby,UK
    Posts
    38

    Post

    How do i keep a window on top constantly in vb???

  2. #2
    Registered User
    Join Date
    Apr 1999
    Location
    Brazil
    Posts
    144

    Post

    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

    Const SWP_NOMOVE = 2
    Const SWP_NOSIZE = 1
    Const FLAGS = SWP_NOMOVE Or SWP_NOSIZE
    Const HWND_TOPMOST = -1

    Dim OnTop As Long

    OnTop = SetWindowPos(hwnd, HWND_TOPMOST, 0, 0, 0, 0, FLAGS)


    This 'll keep ALLWAYS on TOP!
    Be care in his use!!!

    Boa sorte! (It's portuguese not spanish)
    Jefferson

  3. #3
    Member
    Join Date
    Jan 2000
    Location
    Glasgow, MT, USA
    Posts
    44

    Post

    Just a warning, Test that first and then disable it while working on the project. If a Message pops up, you cant get to it!

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