Method GetTextFromUser
GetTextFromUser(string?, string?, string?, Control?, int, int, bool)
Pop up a dialog box with title set to caption,
message, and a defaultValue.
The user may type in text and press OK to return this text, or press Cancel
to return the empty string.
public static string? GetTextFromUser(string? message, string? caption, string? defaultValue = null, Control? parent = null, int x = -1, int y = -1, bool centre = true)
Parameters
messagestringDialog message.
captionstringDialog title.
defaultValuestringDefault value. Optional.
parentControlParent control. Optional.
xintX-position on the screen. Optional. By default is -1.
yintY-position on the screen. Optional. By default is -1.
centreboolIf
true, the message text (which may include new line characters) is centred; iffalse, the message is left-justified.