Skip to main content
Version: 4.1

Interaction

Namespace: Wisej.Web.VisualBasic

Assembly: Wisej.Framework (4.1.0.0)

Replaces the visual methods in Microsoft.VisualBasic.Interaction.

public class Interaction
info

In Visual Basic and C#, you can call this method as an instance method on any object of type Object. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).

Methods

Static member Beep(Target, AudioBase64)

Sounds a tone through the computer's speaker.

ParameterTypeDescription
TargetObjectContext object that initiated this call.
AudioBase64 optionalStringOptional. Custom audio stream. If omitted the default beep wav is played.

Static member InputBox(Target, Prompt, Title, DefaultResponse, XPos, YPos, CloseCallback)

Displays a prompt in a dialog box, waits for the user to input text or click a button, and then returns a string containing the contents of the text box.

ParameterTypeDescription
TargetObjectContext object that initiated this call.
PromptStringRequired String expression displayed as the message in the dialog box.
Title optionalStringOptional. String expression displayed in the title bar of the dialog box. If you omit Title , the application name is placed in the title bar.
DefaultResponse optionalStringOptional. String expression displayed in the text box as the default response if no other input is provided. If you omit DefaultResponse , the displayed text box is empty.
XPos optionalInt32Optional. Numeric expression that specifies, in pixels, the distance of the left edge of the dialog box from the left edge of the screen. If you omit XPos , the dialog box is centered horizontally.
YPos optionalInt32Optional. Numeric expression that specifies, in pixels, the distance of the upper edge of the dialog box from the top of the screen. If you omit YPos , the dialog box is centered vertically.
CloseCallback optionalAction<String>Optional. Asynchronous callback.

Returns: String. The contents of the text box.

Static member InputBoxAsync(Target, Prompt, Title, DefaultResponse, XPos, YPos)

Asynchronous displays a prompt in a dialog box, waits for the user to input text or click a button, and then returns a string containing the contents of the text box.

ParameterTypeDescription
TargetObjectContext object that initiated this call.
PromptStringRequired String expression displayed as the message in the dialog box.
Title optionalStringOptional. String expression displayed in the title bar of the dialog box. If you omit Title , the application name is placed in the title bar.
DefaultResponse optionalStringOptional. String expression displayed in the text box as the default response if no other input is provided. If you omit DefaultResponse , the displayed text box is empty.
XPos optionalInt32Optional. Numeric expression that specifies, in pixels, the distance of the left edge of the dialog box from the left edge of the screen. If you omit XPos , the dialog box is centered horizontally.
YPos optionalInt32Optional. Numeric expression that specifies, in pixels, the distance of the upper edge of the dialog box from the top of the screen. If you omit YPos , the dialog box is centered vertically.

Returns: Task<String>. The contents of the text box.

Static member MsgBox(Target, Prompt, Buttons, Title, CloseCallback)

Displays a message in a dialog box, waits for the user to click a button, and then returns an integer indicating which button the user clicked.

ParameterTypeDescription
TargetObjectContext object that initiated this call.
PromptObjectRequired. String expression displayed as the message in the dialog box.
Buttons optionalMsgBoxStyleOptional. Numeric expression that is the sum of values specifying the number and type of buttons to display, the icon style to use, the identity of the default button, and the modality of the message box. If you omit Buttons , the default value is zero.
Title optionalObjectOptional. String expression displayed in the title bar of the dialog box. If you omit Title , the application name is placed in the title bar.
CloseCallback optionalAction<MsgBoxResult>Optional. Asynchronous callback.

Returns: MsgBoxResult. One of MsgBoxResult.

Static member MsgBoxAsync(Target, Prompt, Buttons, Title)

Asynchronously displays a message in a dialog box, waits for the user to click a button, and then returns an integer indicating which button the user clicked.

ParameterTypeDescription
TargetObjectContext object that initiated this call.
PromptObjectRequired. String expression displayed as the message in the dialog box.
Buttons optionalMsgBoxStyleOptional. Numeric expression that is the sum of values specifying the number and type of buttons to display, the icon style to use, the identity of the default button, and the modality of the message box. If you omit Buttons , the default value is zero.
Title optionalObjectOptional. String expression displayed in the title bar of the dialog box. If you omit Title , the application name is placed in the title bar.

Returns: Task<MsgBoxResult>. One of MsgBoxResult.