共用方式為


Interaction 模組 (Visual Basic)

更新:2007 年 11 月

Interaction 模組會包含用於與物件、應用程式和系統互動的程序。

備註

這個模組可支援執行其他程式、呼叫方法或屬性 (Property)、從電腦發出嗶聲、提供命令列字串、管理 COM 物件,以及控制對話方塊的 Visual Basic 語言關鍵字與執行階段程式庫成員。

成員

AppActivate

Beep

CallByName

Choose

Command

CreateObject

DeleteSetting

Environ

GetAllSettings

GetObject

GetSetting

IIf

InputBox

MsgBox

Partition

SaveSetting

Shell

Switch

 

 

範例

下列範例會使用 Shell 函式,來執行使用者指定的應用程式。如果指定 AppWinStyle.NormalFocus 做為第二個引數,則應用程式會以正常大小開啟,並取得焦點。

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.

請參閱

參考

資訊和互動摘要

關鍵字和成員 (依工作分類)

Visual Basic 語言關鍵字

Visual Basic 執行階段程式庫成員

比較不同語言的關鍵字