Interaction Class
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
The Interaction
module contains procedures used to interact with objects, applications, and systems.
public ref class Interaction sealed
[Microsoft.VisualBasic.CompilerServices.StandardModule]
public sealed class Interaction
[<Microsoft.VisualBasic.CompilerServices.StandardModule>]
type Interaction = class
Public Module Interaction
- Inheritance
-
Interaction
- Attributes
The following example uses the Shell
function to run an application specified by the user. Specifying AppWinStyle.NormalFocus as the second argument opens the application in normal size and gives it the focus.
Dim procID As Integer
' Run calculator.
procID = Shell("C:\Windows\system32\calc.exe", AppWinStyle.NormalFocus)
This module supports the Visual Basic language keywords and run-time library members that run other programs, call a method or property, sound a beep from the computer, provide a command-line string, manipulate COM objects, and control dialog boxes.
App |
Activates an application that is already running. |
App |
Activates an application that is already running. |
Beep() |
Sounds a tone through the computer's speaker. |
Call |
Executes a method on an object, or sets or returns a property on an object. |
Choose(Double, Object[]) |
Selects and returns a value from a list of arguments. |
Command() |
Returns the argument portion of the command line used to start Visual Basic or an executable program developed with Visual Basic. The |
Create |
Creates and returns a reference to a COM object. |
Delete |
Deletes a section or key setting from an application's entry in the Windows registry. The |
Environ(Int32) |
Returns the string associated with an operating-system environment variable. |
Environ(String) |
Returns the string associated with an operating-system environment variable. |
Equals(Object) |
Determines whether the specified object is equal to the current object. (Inherited from Object) |
Get |
Returns a list of key settings and their respective values (originally created with |
Get |
Serves as the default hash function. (Inherited from Object) |
Get |
Returns a reference to an object provided by a COM component. |
Get |
Returns a key setting value from an application's entry in the Windows registry. The |
Get |
Gets the Type of the current instance. (Inherited from Object) |
IIf(Boolean, Object, Object) |
Returns one of two objects, depending on the evaluation of an expression. |
Input |
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. |
Memberwise |
Creates a shallow copy of the current Object. (Inherited from Object) |
Msg |
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. |
Partition(Int64, Int64, Int64, Int64) |
Returns a string representing the calculated range that contains a number. |
Save |
Saves or creates an application entry in the Windows registry. The |
Shell(String, App |
Runs an executable program and returns an integer containing the program's process ID if it is still running. |
Switch(Object[]) |
Evaluates a list of expressions and returns an |
To |
Returns a string that represents the current object. (Inherited from Object) |
منتج | الإصدارات |
---|---|
.NET | Core 3.0, Core 3.1, 5, 6, 7, 8, 9 |
.NET Framework | 1.1, 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1 |
ملاحظات .NET
.NET هو مشروع مصدر مفتوح. حدد رابطًا لتقديم الملاحظات: