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
  callback.ShellBoost.Core.UtilitiesSingleInstance

Namespace:  callback.ShellBoost.Core.Utilities
Assembly:  callback.CBFSShell (in callback.CBFSShell.dll) Version: 22.0.0.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 methodEquals
Determines whether the specified object is equal to the current object.
(Inherited from Object.)
Public methodGetHashCode
Serves as the default hash function.
(Inherited from Object.)
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
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 methodToString
Returns a string that represents the current object.
(Inherited from Object.)
Public methodWaitForMutex(IntPtr, IntPtr)
Waits for the mutex.
Public methodWaitForMutex(Boolean, IntPtr, IntPtr)
Waits for the mutex.
Top
See Also