开发者

Cannot get InputBox after adding reference to Microsoft.VisualBasic

I did what is said here http://www.pcreview.co.uk/forums/thread-1899493.php but in intellisense I only get Microsoft.VisualBasic.VBCodeProvider ???

step 1: Add refernce Microsoft.VisualBasic

开发者_如何学运维

step 2:

private void button1_Click(object sender, EventArgs e)
{
  string result = Microsoft.VisualBasic.Interaction.InputBox("kkk","text", "", 10, 20);

  MessageBox.Show(result);
}


Step 1: Check if you really added the reference ;-)

Microsoft.VisualBasic.VBCodeProvider is located in System.dll, which is referenced for every new project. It seems to me as if you're not referencing Microsoft.VisualBasic.dll at all.


You need to add a reference to Microsoft.VisualBasic, not to the Microsoft.VisualBasic.Compatability library.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜