Class InputBox
Shows a simple dialog asking the user to input some text.
public sealed class InputBox : Form
- Inheritance
-
objectMarshalByRefObjectComponentControlScrollableControlContainerControlFormInputBox
- Extension Methods
Methods
Dispose(bool)
Clean up any resources being used.
protected override void Dispose(bool disposing)
Parameters
disposing
booltrue if managed resources should be disposed; otherwise, false.
Show(IWin32Window?, string, string, string?, bool)
Displays an input box asking the the user to input some text.
public static string? Show(IWin32Window? owner, string title, string prompt, string? defaultText = null, bool password = false)
Parameters
owner
IWin32WindowThe parent window the displayed window is modal to; can be
null
.title
stringThe window title to use.
prompt
stringThe prompt to display.
defaultText
stringThe default text to show pre-entered in the input field.
password
boolShall the input characters be hidden as a password?
Returns
- string
The text the user entered if she pressed OK; otherwise
null
.