U have to use Win API's:
declare this Form level(At the beginning if Form code window):
[code=vb]
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
Private Sub SetAlwaysOnTopM ode(hWndOrForm As Variant, Optional ByVal OnTop As Boolean = _
True)
Dim hWnd As Long
' get the hWnd of the form to be move on top
If VarType(hWndOrF orm) = vbLong Then
hWnd = hWndOrForm
Else
hWnd = hWndOrForm.hWnd
End If
SetWindowPos hWnd, IIf(OnTop, HWND_TOPMOST, HWND_NOTOPMOST) , 0, 0, 0, 0, _
SWP_NOMOVE Or SWP_NOSIZE Or SWP_SHOWWINDOW
End Sub
[/code]
Call this in FormLoad:
[code=vb]
Call SetAlwaysOnTopM ode(Me, True)
[/code]
Comment