|
Добавьте 2 CommandButton (под именем Command1 и Command2).
Когда вы нажимаете первую кнопку, ваша форма поверх всех Private Declare Function SetWindowPos Lib "user32"
(ByVal h%, ByVal hb%, ByVal x%, ByVal Y%, ByVal cx%, ByVal cy%, ByVal F%) As Integer
Const SWP_NOMOVE = 2
Const SWP_NOSIZE = 1
Const flags = SWP_NOMOVE Or SWP_NOSIZE
Const HWND_TOPMOST = -1
Const HWND_NOTOPMOST = -2
Private Sub Command1_Click()
res = SetWindowPos(Form1.hwnd, HWND_TOPMOST, 0, 0, 0, 0, flags) 'Форма on-top
End Sub
Private Sub Command2_Click()
res = SetWindowPos(Form1.hwnd, HWND_NOTOPMOST, 0, 0, 0, 0, flags) 'Форма non-on-top
End Sub
|
|