i have a question that i would like to be answered asap!:)
how do you make the form always be on top like winamp and winzip or something? I really want to use it on my app. thanks in advance!
Printable View
i have a question that i would like to be answered asap!:)
how do you make the form always be on top like winamp and winzip or something? I really want to use it on my app. thanks in advance!
From the great guys at www.allapi.net:
VB Code:
Const HWND_TOPMOST = -1 Const HWND_NOTOPMOST = -2 Const SWP_NOSIZE = &H1 Const SWP_NOMOVE = &H2 Const SWP_NOACTIVATE = &H10 Const SWP_SHOWWINDOW = &H40 Private Declare Sub 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) Private Sub Form_Activate() 'KPD-Team 1998 'URL: [url]http://www.allapi.net/[/url] 'E-Mail: [email][email protected][/email] 'Set the window position to topmost SetWindowPos Me.hWnd, HWND_TOPMOST, 0, 0, 0, 0, _ SWP_NOACTIVATE Or SWP_SHOWWINDOW Or SWP_NOMOVE _ Or SWP_NOSIZE End Sub
hey hobo! thanks for the code. i hope your shareware thing works out;)