System.Windows.Forms.Application: Method Members

The methods of System.Windows.Forms.Application are listed below. For a list of all members, see the Application Members list.

See Also: Inherited members from System.Object

Public Methods

static
AddMessageFilter(IMessageFilter)

Adds a message filter to monitor Windows messages as they are routed to their destinations.

static
DoEvents()

Processes all Windows messages currently in the message queue.

static
EnableVisualStyles()

Enables visual styles for the application.

static
Exit()

Informs all message pumps that they must terminate, and then closes all application windows after the messages have been processed.

static
Exit(System.ComponentModel.CancelEventArgs)

Informs all message pumps that they must terminate, and then closes all application windows after the messages have been processed.

static
ExitThread()

Exits the message loop on the current thread and closes all windows on the thread.

static
FilterMessage(ref Message) : bool
Documentation for this section has not yet been entered.
static
OleRequired() : System.Threading.ApartmentState

Initializes OLE on the current thread.

static
OnThreadException(Exception)

Raises the Application.ThreadException event.

static
RaiseIdle(EventArgs)

Raises the Application.Idle event in hosted scenarios.

static
RegisterMessageLoop(Application.MessageLoopCallback)
Documentation for this section has not yet been entered.
static
RemoveMessageFilter(IMessageFilter)

Removes a message filter from the message pump of the application.

static
Restart()

Shuts down the application and starts a new instance immediately.

static
Run()

Begins running a standard application message loop on the current thread, without a form.

static
Run(ApplicationContext)

Begins running a standard application message loop on the current thread, with an System.Windows.Forms.ApplicationContext.

static
Run(Form)

Begins running a standard application message loop on the current thread, and makes the specified form visible.

static
SetCompatibleTextRenderingDefault(bool)

Sets the application-wide default for the UseCompatibleTextRendering property defined on certain controls.

static
SetSuspendState(PowerState, bool, bool) : bool

Suspends or hibernates the system, or requests that the system be suspended or hibernated.

static
SetUnhandledExceptionMode(UnhandledExceptionMode)

Instructs the application how to respond to unhandled exceptions.

static
SetUnhandledExceptionMode(UnhandledExceptionMode, bool)

Instructs the application how to respond to unhandled exceptions, optionally applying thread-specific behavior.

static
UnregisterMessageLoop()

Unregisters the message loop callback made with Application.RegisterMessageLoop(System.Windows.Forms.Application.MessageLoopCallback).