Usually we use a panel with a label describing/asking an input and a textbox for the user to input and a button to trigger the input action
....but its also simple to create a custom control (dll) with this function...
no hurry at all, we all can wait until... this evening
'btn1 is the OK button, so it should pass the textbox(txt) value....
private void btn1_Click(System.Object sender, System.EventArgs e)
{
get{ return txt.text;}
}
'btn2 is the Clear button, so it should Clear the textbox(txt) value....
private void btn1_Click(System.Object sender, System.EventArgs e)
{
txt.text=""
}
[SIZE=2][COLOR=#008000][B][SIZE=2][COLOR=#0000ff]public [/COLOR][/SIZE][/B][SIZE=2][COLOR=#ff0000]string [/COLOR][/SIZE][B][SIZE=2][COLOR=#191970]Show[/COLOR][/SIZE][/B][SIZE=2][COLOR=#006400]()[/COLOR][/SIZE]
[SIZE=2][COLOR=#006400]{[/COLOR][/SIZE]
[SIZE=2][COLOR=#000000] frmInputBox[/COLOR][/SIZE][SIZE=2][COLOR=#006400].[/COLOR][/SIZE][B][SIZE=2][COLOR=#191970]ShowDialog[/COLOR][/SIZE][/B][SIZE=2][COLOR=#006400]();[/COLOR][/SIZE]
[SIZE=2][COLOR=#000080] return [/COLOR][/SIZE][SIZE=2][COLOR=#000000]StringTypedByUser[/COLOR][/SIZE][SIZE=2][COLOR=#006400];[/COLOR][/SIZE]
[SIZE=2][COLOR=#006400]}[/COLOR][/SIZE]
[/COLOR][/SIZE]
[B][SIZE=2][COLOR=#0000ff]private [/COLOR][/SIZE][/B][SIZE=2][COLOR=#ff0000]void [/COLOR][/SIZE][B][SIZE=2][COLOR=#191970]btnOK_Click[/COLOR][/SIZE][/B][SIZE=2][COLOR=#006400]([/COLOR][/SIZE][SIZE=2]System[/SIZE][SIZE=2][COLOR=#006400].[/COLOR][/SIZE][SIZE=2]Object sender[/SIZE][SIZE=2][COLOR=#006400], [/COLOR][/SIZE][SIZE=2]System[/SIZE][SIZE=2][COLOR=#006400].[/COLOR][/SIZE][SIZE=2]EventArgs e[/SIZE][SIZE=2][COLOR=#006400]) [/COLOR][/SIZE]
[SIZE=2][COLOR=#006400]{[/COLOR][/SIZE]
[SIZE=2] frmInputBox[/SIZE][SIZE=2][COLOR=#006400].[/COLOR][/SIZE][B][SIZE=2][COLOR=#191970]Close[/COLOR][/SIZE][/B][SIZE=2][COLOR=#006400]();[/COLOR][/SIZE]
[SIZE=2][COLOR=#006400]}[/COLOR][/SIZE]