Export (0) Print
Expand All

Application Members

Provides static methods and properties to manage an application, such as methods to start and stop an application, to process Windows messages, and properties to get information about an application. This class cannot be inherited.

The following tables list the members exposed by the Application type.

  Name Description
Public property Static AllowQuit Gets a value indicating whether the caller can quit this application.
Public property Static CommonAppDataPath Gets the path for the application data that is shared among all users.
Public property Static CommonAppDataRegistry Gets the registry key for the application data that is shared among all users.
Public property Static CompanyName Gets the company name associated with the application.
Public property Static CurrentCulture Gets or sets the culture information for the current thread.
Public property Static CurrentInputLanguage Gets or sets the current input language for the current thread.
Public property Static ExecutablePath Gets the path for the executable file that started the application, including the executable name.
Public property Static LocalUserAppDataPath Gets the path for the application data of a local, non-roaming user.
Public property Static MessageLoop Gets a value indicating whether a message loop exists on this thread.
Public property Static OpenForms Gets a collection of open forms owned by the application.
Public property Static ProductName Gets the product name associated with this application.
Public property Static ProductVersion Gets the product version associated with this application.
Public property Static RenderWithVisualStyles Gets a value specifying whether the current application is drawing controls with visual styles.
Public property Static SafeTopLevelCaptionFormat Gets or sets the format string to apply to top-level window captions when they are displayed with a warning banner.
Public property Static StartupPath Gets the path for the executable file that started the application, not including the executable name.
Public property Static UserAppDataPath Gets the path for the application data of a user.
Public property Static UserAppDataRegistry Gets the registry key for the application data of a user.
Public property Static UseWaitCursor Gets or sets whether the wait cursor is used for all open forms of the application.
Public property Static VisualStyleState Gets a value that specifies how visual styles are applied to application windows.
Top

(see also Protected Methods )
  Name Description
Public method Static AddMessageFilter Adds a message filter to monitor Windows messages as they are routed to their destinations.
Public method Static Supported by the .NET Compact Framework DoEvents Processes all Windows messages currently in the message queue.
Public method Static EnableVisualStyles Enables visual styles for the application.
Public method Supported by the .NET Compact Framework Equals  Overloaded. Determines whether two Object instances are equal. (inherited from Object)
Public method Static Supported by the .NET Compact Framework Exit Overloaded. Informs all message pumps that they must terminate, and then closes all application windows after the messages have been processed.
Public method Static ExitThread Exits the message loop on the current thread and closes all windows on the thread.
Public method Static FilterMessage Runs any filters against a window message, and returns a copy of the modified message.
Public method Supported by the .NET Compact Framework GetHashCode  Serves as a hash function for a particular type. (inherited from Object)
Public method Supported by the .NET Compact Framework GetType  Gets the Type of the current instance. (inherited from Object)
Public method Static OleRequired Initializes OLE on the current thread.
Public method Static OnThreadException Raises the ThreadException event.
Public method Static RaiseIdle Raises the Idle event in hosted scenarios.
Public method Static Supported by the .NET Compact Framework ReferenceEquals  Determines whether the specified Object instances are the same instance. (inherited from Object)
Public method Static RegisterMessageLoop Registers a callback for checking whether the message loop is running in hosted environments.
Public method Static RemoveMessageFilter Removes a message filter from the message pump of the application.
Public method Static Restart Shuts down the application and starts a new instance immediately.
Public method Static Supported by the .NET Compact Framework Run Overloaded. Begins running a standard application message loop on the current thread.
Public method Static SetCompatibleTextRenderingDefault Sets the application-wide default for the UseCompatibleTextRendering property defined on certain controls.
Public method Static SetSuspendState Suspends or hibernates the system, or requests that the system be suspended or hibernated.
Public method Static SetUnhandledExceptionMode Overloaded. Instructs the application how to respond to unhandled exceptions.
Public method Supported by the .NET Compact Framework ToString  Returns a String that represents the current Object. (inherited from Object)
Public method Static UnregisterMessageLoop Unregisters the message loop callback made with RegisterMessageLoop.
Top

  Name Description
Protected method Supported by the .NET Compact Framework Finalize  Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection. (inherited from Object)
Protected method Supported by the .NET Compact Framework MemberwiseClone  Creates a shallow copy of the current Object. (inherited from Object)
Top

  Name Description
Public event Static ApplicationExit Occurs when the application is about to shut down.
Public event Static EnterThreadModal Occurs when the application is about to enter a modal state.
Public event Static Idle Occurs when the application finishes processing and is about to enter the idle state.
Public event Static LeaveThreadModal Occurs when the application is about to leave a modal state.
Public event Static ThreadException Occurs when an untrapped thread exception is thrown.
Public event Static ThreadExit Occurs when a thread is about to shut down. When the main thread for an application is about to be shut down, this event is raised first, followed by an ApplicationExit event.
Top

Community Additions

ADD
Show:
© 2014 Microsoft