📄 settop.bas
字号:
Attribute VB_Name = "KeepOnTop"
Declare Sub SetWindowPos Lib "User32" (ByVal hWnd As Long, ByVal hWndInsertAfter As Integer, ByVal X As Integer, ByVal Y As Integer, ByVal cx As Integer, ByVal cy As Integer, ByVal wFlags As Integer)
Declare Function GetModuleUsage Lib "Kernel32" (ByVal hModule As Integer) As Integer
' SetWindowPos Flags
Global Const SWP_NOSIZE = &H1
Global Const SWP_NOMOVE = &H2
Global Const SWP_NOZORDER = &H4
Global Const SWP_NOREDRAW = &H8
Global Const SWP_NOACTIVATE = &H10
Global Const SWP_DRAWFRAME = &H20
Global Const SWP_SHOWWINDOW = &H40
Global Const SWP_HIDEWINDOW = &H80
Global Const SWP_NOCOPYBITS = &H100
Global Const SWP_NOREPOSITION = &H200
Global Const HWND_TOPMOST = -1
Sub SetTopMost(ByVal hWindow As Long, ByVal fBool As Integer)
SetWindowPos hWindow, HWND_TOPMOST - Abs(Not fBool), 0, 0, 0, 0, SWP_NOMOVE Or SWP_NOSIZE
End Sub
Sub WaitTillDone(ByVal hWindow As Integer)
Do While GetModuleUsage(hWindow) > 0
DoEvents
Loop
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -