I'm looking to write a notification application where I'd like to provide popup notifications from the taskbar similiar to the ones in MSN Messenger or most other chat programs. Are there any good examples using VB .NET or C#, ideally without using Win32 calls? Thanks.
views:
1196answers:
4I found this example online. I'm trying to avoid using Win32 calls.
Achilles
2009-06-17 03:31:14
As mentioned in the article, the only way to show the window without stealing focus is the Win32 ShowWindow method. So you can't really avoid Win32 and get the behavior you want.
Paul Alexander
2009-06-17 03:35:56
Took a bit of digging but I found this reference:http://msdn.microsoft.com/en-us/library/system.windows.forms.form.showwithoutactivation.aspxas well as this SO question:http://stackoverflow.com/questions/630420/prevent-form-from-stealing-focus/631082Looks like you can prevent the focus from being stolen without Win32 calls :-D
Achilles
2009-07-03 19:42:10
@Achilles: Nice!
Paul Alexander
2009-07-03 21:06:49
A:
Also known as toast notifications. Here's another example on codeproject.
Slightly off-topic. I think these things are evil. I wish they were never invented because they always pop up at at time when it is most distracting. See human task switching considered harmful.
And for the love of mike, please detect presentation mode and stop putting up toasts. (Do you hear me skype?!)
Brian Reiter
2009-06-17 03:37:43
+3
A:
Perhaps try this, modeled after Outlook rather than MSN Messenger, but of course you can still tweak it:
http://www.codeguru.com/csharp/csharp/cs_misc/userinterface/article.php/c10139
The Matt
2009-06-17 05:10:46
A:
I found a better solution for what I'm looking to to do: http://msdn.microsoft.com/en-us/magazine/cc163732.aspx
Achilles
2009-06-30 21:28:33