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
Const SWP_SHOWWINDOW = &H3
private command1_click()
retvalue = SetWindowPos(Me.hwnd, -1, 0, 0, 0, 0, SWP_SHOWWINDOW) '设置窗口在最前端显示
end sub
private command2_click()
retvalue = SetWindowPos(Me.hwnd, 1, 0, 0, 0, 0, SWP_SHOWWINDOW) '设置窗口不在最前端显示
end sub
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
Const SWP_SHOWWINDOW = &H3
Private Sub Check1_Click()
If Check1.Value = 1 Then
SetWindowPos Me.hwnd, -1, 0, 0, 0, 0, SWP_SHOWWINDOW
Else
SetWindowPos Me.hwnd, 1, 0, 0, 0, 0, SWP_SHOWWINDOW
End If
End Sub