This code will make your form stay on top of any other windows running, just like winamp stays on top.
Original Author: Kevin Nading
Assumptions
just make a new form and make a module and follow instructions below.. if you already have a form and or a module just add the code below to them
Side Effects
do not make a large form stay on top or you will not be able to see the other apps that are open
API Declarations
‘put this stuff in your new module
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
Global Const conHwndTopmost = -1
Global Const conSwpNoActivate = &H10
Global Const conSwpShowWindow = &H40
Code
'just put this line in your form_load event
SetWindowPos hwnd, conHwndTopmost, 100, 100, 400, 141, conSwpNoActivate Or conSwpShowWindow