发送窗体系统消息.frm
来自「个人VB学习源码精选,自己学习时的一些编程小程序,希望对大家有帮助」· FRM 代码 · 共 67 行
FRM
67 行
VERSION 5.00
Begin VB.Form Form1
Caption = "Form1"
ClientHeight = 2940
ClientLeft = 60
ClientTop = 345
ClientWidth = 4620
LinkTopic = "Form1"
ScaleHeight = 2940
ScaleWidth = 4620
StartUpPosition = 3 'Windows Default
Begin VB.CommandButton Command3
Caption = "还原"
Height = 495
Left = 840
TabIndex = 3
Top = 1560
Width = 1215
End
Begin VB.CommandButton Command4
Caption = "关闭"
Height = 495
Left = 2640
TabIndex = 2
Top = 1560
Width = 1215
End
Begin VB.CommandButton Command2
Caption = "缩小"
Height = 495
Left = 2640
TabIndex = 1
Top = 600
Width = 1215
End
Begin VB.CommandButton Command1
Caption = "放大"
Height = 495
Left = 840
TabIndex = 0
Top = 600
Width = 1215
End
End
Attribute VB_Name = "Form1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Private Sub Command1_Click()
SendMessage Me.hwnd, WM_SYSCOMMAND, SC_MAXIMIZE, ByVal 0&
End Sub
Private Sub Command2_Click()
SendMessage Me.hwnd, WM_SYSCOMMAND, SC_MINIMIZE, ByVal 0&
End Sub
Private Sub Command3_Click()
SendMessage Me.hwnd, WM_SYSCOMMAND, SC_RESTORE, ByVal 0&
End Sub
Private Sub Command4_Click()
SendMessage Me.hwnd, WM_SYSCOMMAND, SC_CLOSE, ByVal 0&
End Sub
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?