Interaction Class

Interaction Class

 

The Interaction module contains procedures used to interact with objects, applications, and systems.

Namespace:   Microsoft.VisualBasic
Assembly:  Microsoft.VisualBasic (in Microsoft.VisualBasic.dll)

System.Object
  Microsoft.VisualBasic.Interaction

[StandardModuleAttribute]
public sealed class Interaction

NameDescription
System_CAPS_pubmethodSystem_CAPS_staticAppActivate(Int32)

Activates an application that is already running.

System_CAPS_pubmethodSystem_CAPS_staticAppActivate(String)

Activates an application that is already running.

System_CAPS_pubmethodSystem_CAPS_staticBeep()

Sounds a tone through the computer's speaker.

System_CAPS_pubmethodSystem_CAPS_staticCallByName(Object, String, CallType, Object[])

Executes a method on an object, or sets or returns a property on an object.

System_CAPS_pubmethodSystem_CAPS_staticChoose(Double, Object[])

Selects and returns a value from a list of arguments.

System_CAPS_pubmethodSystem_CAPS_staticCommand()

Returns the argument portion of the command line used to start Visual Basic or an executable program developed with Visual Basic. The My feature provides greater productivity and performance than the Command function. For more information, see CommandLineArgs.

System_CAPS_pubmethodSystem_CAPS_staticCreateObject(String, String)

Creates and returns a reference to a COM object. CreateObject cannot be used to create instances of classes in Visual Basic unless those classes are explicitly exposed as COM components.

System_CAPS_pubmethodSystem_CAPS_staticDeleteSetting(String, String, String)

Deletes a section or key setting from an application's entry in the Windows registry. The My feature gives you greater productivity and performance in registry operations than the DeleteSetting function. For more information, see Registry .

System_CAPS_pubmethodSystem_CAPS_staticEnviron(Int32)

Returns the string associated with an operating-system environment variable.

System_CAPS_pubmethodSystem_CAPS_staticEnviron(String)

Returns the string associated with an operating-system environment variable.

System_CAPS_pubmethodEquals(Object)

Determines whether the specified object is equal to the current object.(Inherited from Object.)

System_CAPS_pubmethodSystem_CAPS_staticGetAllSettings(String, String)

Returns a list of key settings and their respective values (originally created with SaveSetting) from an application's entry in the Windows registry. Using the My feature gives you greater productivity and performance in registry operations than GetAllSettings. For more information, see Registry.

System_CAPS_pubmethodGetHashCode()

Serves as the default hash function. (Inherited from Object.)

System_CAPS_pubmethodSystem_CAPS_staticGetObject(String, String)

Returns a reference to an object provided by a COM component.

System_CAPS_pubmethodSystem_CAPS_staticGetSetting(String, String, String, String)

Returns a key setting value from an application's entry in the Windows registry. The My feature gives you greater productivity and performance in registry operations than GetAllSettings. For more information, see Registry.

System_CAPS_pubmethodGetType()

Gets the Type of the current instance.(Inherited from Object.)

System_CAPS_pubmethodSystem_CAPS_staticIIf(Boolean, Object, Object)

Returns one of two objects, depending on the evaluation of an expression.

System_CAPS_pubmethodSystem_CAPS_staticInputBox(String, String, String, Int32, Int32)

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.

System_CAPS_pubmethodSystem_CAPS_staticMsgBox(Object, MsgBoxStyle, Object)

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.

System_CAPS_pubmethodSystem_CAPS_staticPartition(Int64, Int64, Int64, Int64)

Returns a string representing the calculated range that contains a number.

System_CAPS_pubmethodSystem_CAPS_staticSaveSetting(String, String, String, String)

Saves or creates an application entry in the Windows registry. The My feature gives you greater productivity and performance in registry operations than SaveSetting. For more information, see Registry.

System_CAPS_pubmethodSystem_CAPS_staticShell(String, AppWinStyle, Boolean, Int32)

Runs an executable program and returns an integer containing the program's process ID if it is still running.

System_CAPS_pubmethodSystem_CAPS_staticSwitch(Object[])

Evaluates a list of expressions and returns an Object value corresponding to the first expression in the list that is True.

System_CAPS_pubmethodToString()

Returns a string that represents the current object.(Inherited from Object.)

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.

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)
' The preceding path is for Windows XP.
' The Windows 2000 path is C:\WINNT\system32\calc.exe.

.NET Framework
Available since 1.1
Silverlight
Available since 2.0

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Return to top
Show:
© 2016 Microsoft