6.9.frm
来自「vb编程+从基础到实践光盘代码」· FRM 代码 · 共 30 行
FRM
30 行
VERSION 5.00
Begin VB.Form Form1
Caption = "Form1"
ClientHeight = 3150
ClientLeft = 60
ClientTop = 390
ClientWidth = 4680
LinkTopic = "Form1"
ScaleHeight = 3150
ScaleWidth = 4680
StartUpPosition = 3 '窗口缺省
End
Attribute VB_Name = "Form1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Form_QueryUnload(Cancel As Integer, UnloadMode As Integer)
Dim int1 As Integer
int1 = MsgBox("文件尚未保存,是否要保存?", vbYesNoCancel)
If int1 = vbYes Then '选择“是”则执行保存代码
'save '进行相应的保存操作
Else
If int1 = vbCancel Then
Cancel = 1 '选择取消则停止卸载
End If
End If
End Sub
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?