
Help with Always on top positioning
I hope i understand well.
The simplest way to do that is to use the API Set WondowPos.
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
then in your form_load you insert :
dim result as long
Result = SetWindowPos(Restit.hwnd, -1, 0, 0, 0, 0, Flags)
the value -1 is the value of the HWND_TOPMOST the others values are :
Public Const HWND_TOP = 0
Public Const HWND_BOTTOM = 1
Public Const HWND_NOTOPMOST = -2
i hope it helps you
Quote:
>Hello,
>Need a little help here, How do I code so that a form I have is
>"always on top" no matter what other applications are running on the
>user machine. It's just a little reminder program and I want the small
>form to remain visible in front of other application screens when it
>is running. Thanks in advance
>John