Accessing a Running Application in Visual Basic
This section contains topics that cover how to use the Visual Basic Application model to control the application's run-time behavior, and topics that cover how to get run-time information about the application.
The My.Application object provides properties, methods, and events related to the current application. It allows you to get information about the application, such as the current culture, how the application was deployed, and the environment variables. The Visual Basic Application model exposed by the My.Application object allows an application to run code when the application starts up and shuts down. Similarly, the My.Application.Deployment property provides the current application's ClickOnce deployment object.
Tasks
To |
See |
---|---|
Allow your application to handle other events that might be raised while your code runs |
|
Determine the application's command-line arguments |
|
Check if the application started with the string "/batch" as an argument |
How to: Enable a Batch Mode for Window Forms Applications (Visual Basic) |
Handle any uncaught exception in your application |
|
Use the events provided by the Visual Basic Application model to run code when the application starts or ends |
How to: Run Code When the Application Starts or Ends (Visual Basic) |
Check the command-line arguments of subsequent attempts to start a single-instance application |
|
Download and install the latest version of a ClickOnce application |
How to: Download ClickOnce Application Updates (Visual Basic) |
See Also
Tasks
How to: Specify Assembly Information (Visual Basic, C#)
Reference
Microsoft.VisualBasic.Logging.Log