很简单
比如:
Private Sub Command1_Click()
If Text1.Text = "20100344" Then
MsgBox ("登陆成功!")
Shell "C:\Documents and Settings\Administrator\桌面\登录系统组件\bin\bg1.exe"
End
Else
MsgBox ("您的输入有误,请重新输入!")
End If
End Sub
这是输入密码是的 MessageBox 。
还可以这样:
Private Sub Command1_Click()
MsgBox "正在退出,请稍候!"
End
End Sub
这是退出vb软件时的 MessageBox 。
作用:在对话框中显示消息,等待用户单击按钮,并返回一个 Integer 告诉用户单击哪一个按钮。
语法:
MsgBox(prompt[, buttons] [, title] [, helpfile, context])
MsgBox(prompt[, buttons] [, title] [, helpfile, context])
就是MsgBox,你是从Delphi来的吧,网上有delphi-vb转化程序,可以用那个学