glacialfury: could use more context on when and why this is useful.
Finding Components:
When using FindWindow? for getting the window handle to a component it's always recommend to use the class name instead of the window caption/title.
The following list contains the class names for the main windows of all SharpE components:
SharpBar: TSharpBarMainForm SharpCenter: TSharpCenterWnd SharpCore: TSharpCoreMainWnd SharpDesk: TSharpDeskMainForm SharpDesk2: TSharpDeskMainWnd SharpMenu: TSharpEMenuWnd
MuteX Handles:(Checking if a component is already running)
Most Components register a MuteX handle which can be accessed to check if a component is running.
SharpCenter: SharpCenterMutex SharpCore: SharpCore SharpDesk: SharpDeskMutex SharpDocs: SharpDocsMuteX SharpMenu: SharpMenuMutex SharpShellServices: SharpShellServicesMutex
to check if a MuteX has been created use the following code:
var MH: THandle; begin MH := OpenMutex(MUTEX_ALL_ACCESS, False, 'MutexName'); if MH <> 0 then ...; // MuteX has been created CloseHandle(MH); end;
