Click or drag to resize

SingleInstance Class

A utility class to handle single instance Winforms or WPF applications, based on a Mutex. This class cannot be inherited.
Inheritance Hierarchy
SystemObject
  ShellBoost.Core.UtilitiesSingleInstance

Namespace:  ShellBoost.Core.Utilities
Assembly:  ShellBoost.Core (in ShellBoost.Core.dll) Version: 1.8.3.0
Syntax
C#
public sealed class SingleInstance

The SingleInstance type exposes the following members.

Constructors
  NameDescription
Public methodSingleInstance
Initializes a new instance of the SingleInstance class.
Top
Properties
  NameDescription
Public propertyMessage
Gets the single instance Windows message.
Public propertyMutex
Gets the single instance mutex.
Top
Methods
  NameDescription
Public methodStatic memberActivateWindow
Activates the window.
Public methodOnWndProc(Form, Message, Boolean)
The WNDPROC delegate for Winforms applications.
Public methodOnWndProc(Form, Int32, IntPtr, IntPtr, Boolean)
The WNDPROC delegate for Winforms applications.
Public methodOnWndProc(IntPtr, Int32, IntPtr, IntPtr, Boolean, Boolean, Boolean)
The WNDPROC delegate for WPF applications.
Public methodReleaseMutex
Releases the mutex.
Public methodRunFirstInstance(Action)
Runs the first application instance.
Public methodRunFirstInstance(Action, IntPtr, IntPtr)
Runs the first application instance.
Public methodWaitForMutex(IntPtr, IntPtr)
Waits for the mutex.
Public methodWaitForMutex(Boolean, IntPtr, IntPtr)
Waits for the mutex.
Top
See Also