📄 dialog.frm
字号:
VERSION 5.00
Begin VB.Form Dialog
BorderStyle = 3 'Fixed Dialog
Caption = "退出程序"
ClientHeight = 2715
ClientLeft = 2760
ClientTop = 3750
ClientWidth = 4845
LinkTopic = "Form1"
LockControls = -1 'True
MaxButton = 0 'False
MinButton = 0 'False
ScaleHeight = 2715
ScaleWidth = 4845
ShowInTaskbar = 0 'False
StartUpPosition = 2 'CenterScreen
Begin VB.Timer tmrShow
Enabled = 0 'False
Interval = 1000
Left = 405
Top = 405
End
Begin VB.CheckBox chkExit
Caption = "退出程序时关机"
BeginProperty Font
Name = "宋体"
Size = 12
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 240
Left = 1395
TabIndex = 2
Top = 540
Width = 2130
End
Begin VB.CommandButton CancelButton
Caption = "取消"
BeginProperty Font
Name = "宋体"
Size = 10.5
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Left = 2745
TabIndex = 1
Top = 1215
Width = 1215
End
Begin VB.CommandButton OKButton
Caption = "退出"
BeginProperty Font
Name = "宋体"
Size = 10.5
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Left = 900
TabIndex = 0
Top = 1215
Width = 1215
End
Begin VB.Label lblShow
BeginProperty Font
Name = "宋体"
Size = 10.5
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H000000FF&
Height = 690
Left = 180
TabIndex = 3
Top = 1890
Width = 4515
End
End
Attribute VB_Name = "Dialog"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Public bExit As Boolean '是否关机
Public bCancel As Boolean '是否退出程序
Private Sub CancelButton_Click()
bCancel = True
Unload Me
End Sub
Private Sub chkExit_Click()
If chkExit.Value = 0 Then
lblShow.Caption = "程序退出后1分钟内,外部WatchDog将关闭计算机电源,请尽快手动退出Windows,否则系统配置可能丢失!"
tmrShow.Enabled = True
Else
lblShow.Caption = ""
tmrShow.Enabled = False
End If
End Sub
Private Sub Form_QueryUnload(Cancel As Integer, UnloadMode As Integer)
If UnloadMode = 0 Then
CancelButton.Value = True
End If
End Sub
Private Sub OKButton_Click()
bCancel = False
bExit = chkExit.Value
Unload Me
End Sub
Private Sub tmrShow_Timer()
lblShow.Visible = Not lblShow.Visible
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -