public static void SEBToForeground() { try { SebApplicationChooserForm.forceSetForegroundWindow(SEBClientInfo.SebWindowsClientForm.Handle); SEBClientInfo.SebWindowsClientForm.Activate(); } catch (Exception ex) { } }
/// ---------------------------------------------------------------------------------------- /// <summary> /// Move SEB to the foreground. /// </summary> /// ---------------------------------------------------------------------------------------- public static void SEBToForeground() { //if ((bool)SEBSettings.valueForDictionaryKey(SEBSettings.settingsCurrent, SEBSettings.KeyShowTaskBar)) //{ try { //SetForegroundWindow(SEBClientInfo.SebWindowsClientForm.Handle); SebApplicationChooserForm.forceSetForegroundWindow(SEBClientInfo.SebWindowsClientForm.Handle); SEBClientInfo.SebWindowsClientForm.Activate(); } catch (Exception) { } //} }
/// ---------------------------------------------------------------------------------------- /// <summary> /// Move SEB to the foreground. /// </summary> /// ---------------------------------------------------------------------------------------- public static void SEBToForeground() { //if ((bool)SEBSettings.valueForDictionaryKey(SEBSettings.settingsCurrent, SEBSettings.KeyShowTaskBar)) //{ try { if (SEBClientInfo.SebWindowsClientForm.InvokeRequired) { SEBClientInfo.SebWindowsClientForm.Invoke((MethodInvoker) delegate { SEBToForeground(); }); return; } // this code will run on main (UI) thread //SetForegroundWindow(SEBClientInfo.SebWindowsClientForm.Handle); SebApplicationChooserForm.forceSetForegroundWindow(SEBClientInfo.SebWindowsClientForm.Handle); SEBClientInfo.SebWindowsClientForm.Activate(); } catch (Exception) { } //} }