📄 msgdragfrom.bas
字号:
Attribute VB_Name = "msgDragFrom"
Option Explicit
' Used to make the form draggable
Public Declare Function SendMessage Lib "user32" Alias "SendMessageA" (ByVal hwnd As Long, ByVal wMsg As Long, ByVal wParam As Long, lParam As Any) As Long
' Also used to make the form draggable
Public Declare Function ReleaseCapture Lib "user32" () As Long
Public Sub DoDrag(TheForm As Form)
' TheForm: The form you want to start dragging
If TheForm.WindowState <> vbMaximized Then
ReleaseCapture
SendMessage TheForm.hwnd, &HA1, 2, 0&
End If
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -