ApplicationContext Property


ApplicationContext Property

Location

My.Application.ApplicationContext

Syntax

     Dim result As System.Windows.Forms.ApplicationContext = _        My.Application.ApplicationContext 

Description

The ApplicationContext property returns an object of type System.Windows.Forms.ApplicationContext for the active thread. This object provides features that let you monitor and interact with the closing activities of the current thread of execution. For instance, you can force the exit of the current thread based on conditions you determine.

Public Members

The returned ApplicationContext object includes the following notable public members.

Member

Description

ExitThread

Method. Forces the current application thread to exit.

MainForm

Property. Identifies the "main" Windows form within the running application thread.

OnMainFormClosed

Method. This method is called when the main application form (as defined through the MainForm property) closes. By default, this method causes the thread to exit.

ThreadExit

Event. Called just before the active thread exits so that any closing activities can be performed.


Usage at a Glance

This property is only valid in Windows Forms applications.

Related Framework Entries

  • Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.ApplicationContext Property

  • System.Windows.Forms.ApplicationContext Class

See Also

Application Object




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