Results 1 to 6 of 6

Thread: On top?

  1. #1

    Thread Starter
    New Member
    Join Date
    Apr 2000
    Posts
    13

    Unhappy

    Okay, I've done it before, but I've lost the source. How do I make a window stay on top always? Any help will be muchly appreciated.

  2. #2
    Guest
    Use the SetWindowPos API.
    Code:
    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
    
    Private Sub Form_Load()
        SetWindowPos hwnd, -1, 0, 0, 0, 0, 3
    End Sub

  3. #3
    Guest
    What other things can be done with that API function? (except set window the position :)

  4. #4
    Guest
    The API (Application Program Interface) is a set of commands that you can use to access low level operating system functions.

    Basically the API allows you to access the operating system directly. This gives the programmer a lot more power and flexibility.

    A large library of API exists, allowing you to do all sorts
    of things many which are not normally possible using regular VB.

    Anything from closing other applications, hiding the task
    bar to emptying the recycle bin or closing down windows.



  5. #5
    Frenzied Member Jop's Avatar
    Join Date
    Mar 2000
    Location
    Amsterdam, the Netherlands
    Posts
    1,986

    Talking

    hehe

    What other things can be done with that API function? (except set window the position
    I think you can only set the window's position, that's why the api's called SetWindowPos huh?
    Jop - validweb.nl

    Alcohol doesn't solve any problems, but then again, neither does milk.

  6. #6
    Guest
    That will teach me to speed read the site hu!

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