物件 (Visual Basic)Objects (Visual Basic)

本主題提供其他主題的連結,而這些主題記錄 Visual Basic 執行階段物件,並包含其成員程序、屬性和事件的表格。This topic provides links to other topics that document the Visual Basic run-time objects and contain tables of their member procedures, properties, and events.

Visual Basic 執行階段物件Visual Basic Run-time Objects

Collection 提供便利的方式,以將一組相關項目當成單一物件來查看。Provides a convenient way to see a related group of items as a single object.
Err 包含執行階段錯誤的相關資訊。Contains information about run-time errors.
My.Application 物件包含下列類別:The My.Application object consists of the following classes:

ApplicationBase 提供適用於所有專案的成員。ApplicationBase provides members that are available in all projects.

WindowsFormsApplicationBase 提供適用於 Windows Forms 應用程式的成員。WindowsFormsApplicationBase provides members available in Windows Forms applications.

ConsoleApplicationBase 提供適用於主控台應用程式的成員。ConsoleApplicationBase provides members available in console applications.
提供僅與目前應用程式或 DLL 建立關聯的資料。Provides data that is associated only with the current application or DLL. 使用 My.Application 無法改變任何系統層級資訊。No system-level information can be altered with My.Application.

某些成員僅適用於 Windows Forms 或主控台應用程式。Some members are available only for Windows Forms or console applications.
My.Application.Info (Info)My.Application.Info (Info) 提供屬性,以取得應用程式相關資訊,例如版本號碼、描述、載入的組件等等。Provides properties for getting the information about an application, such as the version number, description, loaded assemblies, and so on.
My.Application.Log (Log)My.Application.Log (Log) 提供屬性和方法,以將事件和例外狀況資訊寫入至應用程式的記錄檔接聽程式。Provides a property and methods to write event and exception information to the application's log listeners.
My.Computer (Computer)My.Computer (Computer) 提供的屬性,以操作電腦元件,例如音訊、時鐘、鍵盤、檔案系統等等。Provides properties for manipulating computer components such as audio, the clock, the keyboard, the file system, and so on.
My.Computer.Audio (Audio)My.Computer.Audio (Audio) 提供用於播放音效的方法。Provides methods for playing sounds.
My.Computer.Clipboard (Clipboard)My.Computer.Clipboard (Clipboard) 提供用於操作剪貼簿的方法。Provides methods for manipulating the Clipboard.
My.Computer.Clock (Clock)My.Computer.Clock (Clock) 提供屬性,以從系統時鐘存取目前當地時間與國際標準時間 (相當於格林威治標準時間)。Provides properties for accessing the current local time and Universal Coordinated Time (equivalent to Greenwich Mean Time) from the system clock.
My.Computer.FileSystem (FileSystem)My.Computer.FileSystem (FileSystem) 提供屬性和方法,以處理磁碟機、檔案和目錄。Provides properties and methods for working with drives, files, and directories.
My.Computer.FileSystem.SpecialDirectories (SpecialDirectories)My.Computer.FileSystem.SpecialDirectories (SpecialDirectories) 提供屬性,以存取常用的參考目錄。Provides properties for accessing commonly referenced directories.
My.Computer.Info (ComputerInfo)My.Computer.Info (ComputerInfo) 提供屬性,以取得電腦的記憶體、已載入組件、名稱和作業系統的相關資訊。Provides properties for getting information about the computer's memory, loaded assemblies, name, and operating system.
My.Computer.Keyboard (Keyboard)My.Computer.Keyboard (Keyboard) 提供屬性以存取鍵盤目前的狀態,例如目前已按下哪些按鍵,並提供方法將按鍵輸入傳送至使用中視窗。Provides properties for accessing the current state of the keyboard, such as what keys are currently pressed, and provides a method to send keystrokes to the active window.
My.Computer.Mouse (Mouse)My.Computer.Mouse (Mouse) 提供屬性,以取得本機電腦上已安裝之滑鼠的格式和組態相關資訊。Provides properties for getting information about the format and configuration of the mouse that is installed on the local computer.
My.Computer.Network (Network)My.Computer.Network (Network) 提供屬性、事件和方法,以與電腦所連接的網路互動。Provides a property, an event, and methods for interacting with the network to which the computer is connected.
My.Computer.Ports (Ports)My.Computer.Ports (Ports) 提供屬性和方法,以存取電腦的序列連接埠。Provides a property and a method for accessing the computer's serial ports.
My.Computer.Registry (RegistryProxy)My.Computer.Registry (RegistryProxy) 提供屬性和方法,以操作登錄。Provides properties and methods for manipulating the registry.
My.Forms 物件My.Forms Object 提供屬性,以存取目前專案中所宣告的每個 Windows Form 的執行個體。Provides properties for accessing an instance of each Windows Form declared in the current project.
My.Log (AspLog)My.Log (AspLog) 提供屬性和方法,以將事件和例外狀況資訊寫入應用程式的 Web 應用程式記錄檔接聽程式。Provides a property and methods for writing event and exception information to the application's log listeners for Web applications.
My.Request 物件My.Request Object 取得所要求頁面的 HttpRequest 物件。Gets the HttpRequest object for the requested page. My.Request 物件包含目前 HTTP 要求的相關資訊。The My.Request object contains information about the current HTTP request.

My.Request 物件僅適用於 ASP.NET 應用程式。The My.Request object is available only for ASP.NET applications.
My.Resources 物件My.Resources Object 提供屬性和類別,以存取應用程式的資源。Provides properties and classes for accessing an application's resources.
My.Response 物件My.Response Object 取得與 HttpResponse 關聯的 Page 物件。Gets the HttpResponse object that is associated with the Page. 此物件可讓您將 HTTP 回應資料傳送給用戶端,並包含該回應的相關資訊。This object allows you to send HTTP response data to a client and contains information about that response.

My.Response 物件僅適用於 ASP.NET 應用程式。The My.Response object is available only for ASP.NET applications.
My.Settings 物件My.Settings Object 提供屬性和方法,以存取應用程式的設定。Provides properties and methods for accessing an application's settings.
My.User (User)My.User (User) 提供目前使用者相關資訊的存取權。Provides access to information about the current user.
My.WebServices 物件My.WebServices Object 提供屬性,以建立和存取目前專案所參考之每個 Web 服務的單一執行個體。Provides properties for creating and accessing a single instance of each Web service that is referenced by the current project.
TextFieldParser 提供用於剖析結構化文字檔的方法和屬性。Provides methods and properties for parsing structured text files.

請參閱See also