You may need to add a reference to Microsoft.Visual Basic .NET Runtime (in
MicrosoftVisualBasic.dll). If you create a new Windows Forms project in VB
(I'm using VS03 so I can't speak for VS02) it'll just be there.
In C# you have to add a reference to "Microsoft.Visual Basic .NET Runtime"
and use something like this (remember to add "using Microsoft.VisualBasic;"
at the top of your source):
string s = Interaction.InputBox( "Enter your text:", "" , "default
text", -1, -1 );
Unlike Visual Basic where every parameter except the prompt are optional, in
C# you have to specify them.
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.