📄 例4.7 msgbox过程的应用.frm
字号:
VERSION 5.00
Begin VB.Form Form1
Caption = "例4.7 MsgBox过程的应用"
ClientHeight = 3090
ClientLeft = 60
ClientTop = 450
ClientWidth = 4680
LinkTopic = "Form1"
ScaleHeight = 3090
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
'例4.7 MsgBox过程的应用。判断数据结果是否正确。
Private Sub Form_Click()
Dim msg1 As String, style, response, mystr As String
msg1 = "数据正确吗?"
style = vbYesNo + vbCritical + vbDefaultButton2
response = MsgBox(msg1, style, "例4.6 提示信息")
If response = vbYes Then
mystr = "数据正确"
Else
mystr = "数据错误"
End If
MsgBox mystr, , "例4.7" 'MsgBox过程(语句形式)
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -