具體操作方法如下:
3、在彈出的程式碼視窗中貼上下列程式碼: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 HWND_TOPMOST = -1Const HWND_NOTOPMOST = -2Const SWP_NOSIZE = &H1Const SWP_NOMOVE = &H2
Sub 視窗總在最前面()SetWindowPos Application.hwnd, HWND_TOPMOST, 0, 0, 0, 0, SWP_NOSIZE Or SWP_NOMOVEEnd SubSub 恢復()SetWindowPos Application.hwnd, HWND_NOTOPMOST, 0, 0, 0, 0, SWP_NOSIZE Or SWP_NOMOVEEnd Sub
具體操作方法如下:
3、在彈出的程式碼視窗中貼上下列程式碼: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 HWND_TOPMOST = -1Const HWND_NOTOPMOST = -2Const SWP_NOSIZE = &H1Const SWP_NOMOVE = &H2
Sub 視窗總在最前面()SetWindowPos Application.hwnd, HWND_TOPMOST, 0, 0, 0, 0, SWP_NOSIZE Or SWP_NOMOVEEnd SubSub 恢復()SetWindowPos Application.hwnd, HWND_NOTOPMOST, 0, 0, 0, 0, SWP_NOSIZE Or SWP_NOMOVEEnd Sub