VB.NET InputBox无法正常运行错误

时间:2018-05-10 06:43:09

标签: vb.net visual-studio-2010

VB.NET InputBox无法正常工作错误提示... .................................................. .................................................. .................................................. ..........

Public Class Form1
        Dim user As String
        Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
            user = inputBox("Enter Your Name", "Input Box", "Bill Gates", 100, 100)
            Label1.Text = "Hello," & user
        End Sub
    End Class
  

'的InputBox'是命名空间&不能用作表达式

。 错误提示:无法启动调试器,因为path \ _ inputBox \ exe'缺少

  

我正在使用VS 2010终极

1 个答案:

答案 0 :(得分:0)

像这样更改您的代码..

   user = Microsoft.VisualBasic.Interaction.InputBox("Enter Your Name", "Input 
            Box", "Bill Gates", 100, 100)
   Label1.Text = "Hello," & user