佐山爱的一部经典剧情:急!!!vb.net问题("msgbox"是命名空间,因此不是有效表达式)????

来源:百度文库 编辑:中科新闻网 时间:2024/05/03 01:38:24
Dim boxstyle As Integer = vbOKOnly
‘……
Dim intReturn As String
Dim strPrompt, strTitle As String
strPrompt = Me.txtPrompt.Text
strTitle = Me.txtTitle.Text
intReturn = msgbox(strPrompt, boxstyle, strTitle)
MessageBox.Show(intReturn, "返回值为", MessageBoxButtons.OK)

系统提示出错:"msgbox"是命名空间,因此不是有效表达式
怎么回事
"msgbox"是命名空间,因此不是有效表达式
怎么回事

Dim boxstyle As Integer = vbOKOnly
‘……
Dim intReturn As String
Dim strPrompt, strTitle As String
strPrompt = Me.txtPrompt.Text
strTitle = Me.txtTitle.Text
msgbox(intReturn)