例4.7 msgbox过程的应用.frm
来自「蒋加伏主编VB程序设计第四版PPT及全部课本源码 北京邮电大学出版社 」· FRM 代码 · 共 34 行
FRM
34 行
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 + =
减小字号Ctrl + -
显示快捷键?