' Make the form topmost or not.
Private Sub SetOnTop(Optional ByVal on_top As Boolean = _
True)
If on_top Then
SetWindowPos hwnd, _
HWND_TOPMOST, 0, 0, 0, 0, _
SWP_NOMOVE + SWP_NOSIZE
Else
SetWindowPos hwnd, _
HWND_NOTOPMOST, 0, 0, 0, 0, _
SWP_NOMOVE + SWP_NOSIZE
End If
End Sub
|