From 631172c45667fa8ec07e14b033706bd8f2592870 Mon Sep 17 00:00:00 2001 From: jays2kings Date: Tue, 18 Nov 2014 17:07:27 -0500 Subject: [PATCH] Single instances fix --- DS4Tool/Program.cs | 5 ++--- DS4Tool/WinProgs.cs | 4 ++-- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/DS4Tool/Program.cs b/DS4Tool/Program.cs index 825e0ce..c9ba2d7 100644 --- a/DS4Tool/Program.cs +++ b/DS4Tool/Program.cs @@ -106,14 +106,13 @@ namespace DS4Windows private delegate void SetFormVisableDelegate(Form frm); static private void ThreadFormVisable(Form frm) { - if (frm != null && frm is DS4Form) + if (frm != null) { if (frm is DS4Form) { // display the form and bring to foreground. - frm.Visible = true; frm.WindowState = FormWindowState.Normal; - frm.Show(); + frm.Focus(); } else { diff --git a/DS4Tool/WinProgs.cs b/DS4Tool/WinProgs.cs index 6bc2e24..5ae59e7 100644 --- a/DS4Tool/WinProgs.cs +++ b/DS4Tool/WinProgs.cs @@ -89,9 +89,9 @@ namespace DS4Windows public void ShowMainWindow() { - form.Visible = true; - form.WindowState = FormWindowState.Normal; form.Show(); + form.WindowState = FormWindowState.Normal; + form.Focus(); } public void LoadP()