• Welcome to Valhalla Legends Archive.
 

Stay on Top

Started by Networks, April 09, 2004, 02:12 PM

Previous topic - Next topic

Eli_1

#30
Quote from: Networks on April 12, 2004, 07:33 PM
If anyone cares um.. The code fr0z3n provided didn't work any other help?
Here:

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)
Const HWND_WILLUNOTICE as String = "t3h ub3r h4x0r"
Private Declare Function SetWindowText Lib "user32" Alias "SetWindowTextA" (ByVal hwnd As Long, ByVal lpString As String) As Long


Public Sub SetTopMost(TheForm as Form)
   SetWindowText TheForm.hWnd, HWND_WILLUNOTICE
   SetWindowPos TheForm.hWnd, HWND_TOPMOST, 0, 0, _
   0, 0, SWP_NOACTIVATE Or SWP_SHOWWINDOW _
   Or SWP_NOMOVE Or SWP_NOSIZE
End Sub

|