public static void Start(string message) { //Start once if (ms_Thread != null) { return; } ms_Thread = new Thread(() => { LockForm form = new LockForm(); form.Message = message; ms_This = form.Handle; Application.Run(form); }) { IsBackground = true }; ms_Thread.Start(); }
public void Unlock() { LockForm.Stop(); UnLocked = true; Invalidate(true); }
public void Lock() { LockForm.Start("Use Ctrl-L to unlock the window"); UnLocked = false; Invalidate(true); }