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
disposingbooltrue if managed resources should be disposed; otherwise, false.
Show(IWin32Window?, string, string, string?, bool)
Displays an input box asking the user to input some text.
public static string? Show(IWin32Window? owner, string title, string prompt, string? defaultText = null, bool password = false)
Parameters
ownerIWin32WindowThe parent window the displayed window is modal to; can be
null.titlestringThe window title to use.
promptstringThe prompt to display.
defaultTextstringThe default text to show pre-entered in the input field.
passwordboolShall the input characters be hidden as a password?
Returns
- string
The text the user entered if she pressed OK; otherwise
null.