From 1221c65f35882fd54c98224ea2005c2993354242 Mon Sep 17 00:00:00 2001 From: gamosoft_cp Date: Tue, 23 Apr 2013 16:25:31 +0000 Subject: [PATCH] Changed alert sound to beep first and then show up the form. Fixed focus steal from alert form. --- Outlook2013TodoAddIn/NewMailAlert.cs | 2 -- Outlook2013TodoAddIn/ThisAddIn.cs | 2 +- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/Outlook2013TodoAddIn/NewMailAlert.cs b/Outlook2013TodoAddIn/NewMailAlert.cs index 30ed6d1..65f2461 100644 --- a/Outlook2013TodoAddIn/NewMailAlert.cs +++ b/Outlook2013TodoAddIn/NewMailAlert.cs @@ -90,7 +90,6 @@ namespace Outlook2013TodoAddIn { this.WindowState = FormWindowState.Normal; } - this.Focus(); this.BringToFront(); } @@ -108,7 +107,6 @@ namespace Outlook2013TodoAddIn { bool result = ShowWindow(this.Handle, SW_SHOW); //bool result = AnimateWindow(this.Handle, 200, AW_BLEND); - this.BringToFront(); return result; } diff --git a/Outlook2013TodoAddIn/ThisAddIn.cs b/Outlook2013TodoAddIn/ThisAddIn.cs index 4eb7eee..352c21c 100644 --- a/Outlook2013TodoAddIn/ThisAddIn.cs +++ b/Outlook2013TodoAddIn/ThisAddIn.cs @@ -66,8 +66,8 @@ namespace Outlook2013TodoAddIn { NewMailAlert nm = new NewMailAlert(newMail, Properties.Settings.Default.DisplayTimeOut); // Show the popup without stealing focus - nm.ShowPopup(); SoundHelper.sndPlaySoundW(SoundHelper.MailBeep, SoundHelper.SND_NODEFAULT); + nm.ShowPopup(); } }