Application Class


Application Class

Namespace

System.Windows.Forms

Creatable

No

Description

The Application class provides a diverse range of functionality, including support for multithreaded programming, access to the system registry, and support for subclassing (intercepting messages sent to application windows). It also includes a variety of informational functions, such as properties to retrieve the company name, to retrieve the application's executable path, and to retrieve the application's name and version. Members of the Application class are shared and do not require an object instance for use.

The following table lists some of the more useful and interesting members of the Application class. Those marked with an asterisk (*) have separate entries in this chapter.

Member

Description

AddMessageFilter Method

Adds a special filter procedure to a thread's message queue.

ApplicationExit Event

Fires when an application is being shut down.

CompanyName Property *

Gets the company name as stored in the assembly.

CurrentCulture Property

Retrieves an object that describes the active culture-specific information.

CurrentInputLanguage Property

Retrieves an object that describes the user-interface input language.

DoEvents Method *

Allows the application to process pending messages in the message queue.

EnableRTLMirroring Method

New in 2005. Enables automatic right-to-left mirroring when displaying text.

ExecutablePath Property *

Returns the full path of the current application.

Exit Method

Exits the application gracefully.

ExitThread Method

Exits the current thread gracefully.

Idle Event

Fires when the application is about to enter an idle state.

OpenForms Property

New in 2005. The collection of open forms in the application.

ProductName Property *

Gets the product name as stored in the assembly.

ProductVersion Property *

Gets the product version information as stored in the assembly.

RemoveMessageFilter Method

Removes a previously added message filter.

Run Method *

Starts a new thread and message loop.

StartupPath Property

Gets the path of the application that started the current process.

ThreadExit Event

Fires when a thread is about to shut down.


Version Differences

Beginning with Visual Basic 2005, the My.Application object provides simplified access to many application-specific features and informational properties.

See Also

Application.CompanyName Property, Application.DoEvents Method, Application.ExecutablePath Property, Application.ProductName Property, Application.ProductVersion Property




Visual Basic 2005(c) In a Nutshell
Visual Basic 2005 in a Nutshell (In a Nutshell (OReilly))
ISBN: 059610152X
EAN: 2147483647
Year: 2004
Pages: 712

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net