📄 frmmsgboxex.frm
字号:
VERSION 5.00
Begin VB.Form frmMsgBoxEx
BorderStyle = 3 'Fixed Dialog
ClientHeight = 1830
ClientLeft = 45
ClientTop = 45
ClientWidth = 5310
ControlBox = 0 'False
KeyPreview = -1 'True
LinkTopic = "Form1"
LockControls = -1 'True
MaxButton = 0 'False
MinButton = 0 'False
ScaleHeight = 1830
ScaleWidth = 5310
ShowInTaskbar = 0 'False
Begin VB.Timer tmrAutoClose
Enabled = 0 'False
Left = 2070
Top = 675
End
Begin VB.CommandButton btn
Height = 345
Index = 4
Left = 3900
Style = 1 'Graphical
TabIndex = 5
Top = 1140
Width = 1140
End
Begin VB.CommandButton btn
Height = 345
Index = 3
Left = 2700
Style = 1 'Graphical
TabIndex = 4
Top = 1140
Width = 1140
End
Begin VB.CommandButton btn
Height = 345
Index = 2
Left = 1500
Style = 1 'Graphical
TabIndex = 3
Top = 1140
Width = 1140
End
Begin VB.CommandButton btn
Height = 345
Index = 1
Left = 315
Style = 1 'Graphical
TabIndex = 1
Top = 1140
Width = 1140
End
Begin VB.PictureBox Picture1
Appearance = 0 'Flat
AutoRedraw = -1 'True
BorderStyle = 0 'None
ForeColor = &H80000008&
Height = 615
Left = 150
ScaleHeight = 615
ScaleWidth = 615
TabIndex = 6
Top = 415
Width = 615
End
Begin VB.Image Image4
Height = 225
Left = 2700
Picture = "frmMsgBoxEx.frx":0000
Top = 0
Width = 255
End
Begin VB.Label Label1
BackColor = &H80000002&
ForeColor = &H80000009&
Height = 240
Left = 0
TabIndex = 0
Top = 5
Width = 810
End
Begin VB.Label Label2
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "Label2"
Height = 195
Left = 795
TabIndex = 2
Top = 480
Width = 480
End
End
Attribute VB_Name = "frmMsgBoxEx"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Private Declare Function ReleaseCapture Lib "user32" () As Long
Private Declare Function SendMessage Lib "user32" Alias "SendMessageA" (ByVal hWnd As Long, ByVal wMsg As Long, ByVal wParam As Long, lParam As Long) As Long
Private Const WM_NCLBUTTONDOWN& = &HA1
Private Const HTCAPTION& = 2
Private fButton As Integer, hw As Long
Private Sub btn_Click(Index As Integer)
tmrAutoClose.Enabled = False
fButton = Index
Me.Hide
End Sub
Private Sub Form_Load()
hw = Me.hWnd
End Sub
Private Sub Label1_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
If Button = vbLeftButton Then
ReleaseCapture
Call SendMessage(hw, WM_NCLBUTTONDOWN, HTCAPTION, 0&)
End If
End Sub
Public Property Get getButton() As Integer
getButton = fButton
End Property
Private Sub tmrAutoClose_Timer()
Dim i As Integer
i = tmrAutoClose.Tag
If i > 0 And i < 5 Then
btn_Click i
End If
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -