I have an application written in VB.NET 2005 that has a main form with a datagridview containing information that is updated every 10 seconds and pops up a new form when certain thresholds have been met. This new, borderless form is like an alert that is displayed near the user's system tray.
My problem is that when this alert form is displayed, the form gets the main focus from whatever the user is doing at the time. For example, if the user is typing an e-mail in Outlook, the focus is transferred from Outlook to the popup.
How can I get my popup alert to be displayed as the TopMost form without interrupting the user? For instance, when a new e-mail is received, a popup is displayed in MSN Messenger but it doesn't take focus away from what the user is doing yet it still stays on top of all the forms.
I have tried overriding the ShowWithoutActivation property in .NET 2.0 but it doesn't seem to work.
Protected Overrides ReadOnly Property ShowWithoutActivation() As Boolean
' Gets a value indicating whether the window will be activated when shown
' Set to TRUE so the popup won't interrupt the user's work by taking
' input focus away from the user's current window