Moze ovako nekako:
Code:
Option Explicit
Private Const HWND_BOTTOM = 1
Private Const HWND_NOTOPMOST = -2
Private Const HWND_TOP = 0
Private Const HWND_TOPMOST = -1
Private Const SWP_NOMOVE = &H2
Private Const SWP_NOSIZE = &H1
Private Declare Function GetActiveWindow Lib "user32" () As Long
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
Sada mozes koristiti dve rutine (za postavljanje na 'top' i za vracanje u 'normalu'):
Code:
Public Sub MakeWindowAlwaysTop(hwnd As Long)
SetWindowPos hwnd, HWND_TOPMOST, 0, 0, 0, 0, _
SWP_NOMOVE + SWP_NOSIZE
End Sub
Public Sub MakeWindowNotTop(hwnd As Long)
SetWindowPos hwnd, HWND_NOTOPMOST, 0, 0, 0, 0, _
SWP_NOMOVE + SWP_NOSIZE
End Sub
Rutine koristis tako sto prosledis hWnd svojstvo forme.
HTH
Commercial-Free !!!