My.Application.Run MethodÂ
Sets up and starts the Visual Basic Application model.
' Usage
My.Application.Run(commandLine)
' Declaration
Public Sub Run( _
ByVal commandLine As String() _
)
Parameters
- commandLine
Array of type String. The command line from Sub Main.
Remarks
The My.Application.Run method provides support for the Visual Basic Application model. This method should be called only from the application's Sub Main. By default, the Sub Main of a Windows Forms application calls this method. For more information, see Overview of the Visual Basic Application Model.
Requirements
Namespace: Microsoft.VisualBasic.ApplicationServices
Class: WindowsFormsApplicationBase
Assembly: Visual Basic Runtime Library (in Microsoft.VisualBasic.dll)
Availability by Project Type
Project type | Available |
---|---|
Windows Application |
Yes |
Class Library |
No |
Console Application |
No |
Windows Control Library |
No |
Web Control Library |
No |
Windows Service |
No |
Web Site |
No |
Permissions
The following permissions may be necessary:
Permission | Description |
---|---|
Controls the ability to access all environment variables. Associated enumeration: Unrestricted. |
|
Controls the ability to access files and folders. Associated enumeration: Unrestricted. |
|
Controls the ability to access registry variables. Associated enumeration: Unrestricted. |
|
Controls the permissions related to user interfaces and the clipboard. Associated enumeration: AllWindows. |
|
Controls rights to access HTTP Internet resources. Associated enumeration: Unrestricted. |
|
Controls rights to make or accept connections on a transport address. Associated enumeration: Unrestricted. |
|
Controls access to a Windows NT performance counter component. Associated enumeration: Unrestricted. |
For more information, see Code Access Security and Requesting Permissions.
See Also
Reference
My.Application Object
Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.Run(System.String[])