Inside and Out…

An attempt to understand technology better…

[Tip] Taking quick inputs in WinForm applications

Posted by Gaurav Khanna on February 2, 2006

There are frequent scenarios when we need to take inputs from the user but which dont warrant designing a form to take the input. For such scenarios, use the Interaction class’s static InputBox method, which is based in Microsoft.VisualBasic assembly. Sample usage is below:

string strServiceMachine = Interaction.InputBox(“Enter the IP Address/Name of the machine running Sudoku Game service:”, this.Text, null,-1,-1);

Very similar to VB6’s InputBox function.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

 
%d bloggers like this: