You can accomplish this using the SetWindowPos API...
In a module place the following code:
Then in a function or, as in my example, the form_load event place the following code:Code:Public Const HWND_TOPMOST& = -1 Const SWP_NOMOVE& = &H2 Const SWP_NOSIZE& = &H1 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)
Code:Private Sub Form_Load() Dim lFlags As Long Dim lStay As Long lFlags = SWP_NOSIZE Or SWP_NOMOVE lStay = SetWindowPos(Me.hWnd, HWND_TOPMOST, 0, 0, 0, 0, lFlags) End Sub




Reply With Quote