Thursday, November 02, 2006

inputbox in C#.net 2005 winform app

C# does not support inputbox, but C#.net2005 can have added reference to Microsoft.VisualBasic.dll

then in C#.net2005, you will be able to something like:

private void button3_Click(object sender, EventArgs e)
{
string userInput = Microsoft.VisualBasic.Interaction.InputBox("Give me something, I will tell you what you got?", "Question Popup", "Default Text",400,400).ToString();
MessageBox.Show(userInput);
}

No comments: