的MessageBox.show味,显示了在任务栏上 [英] MessageBox.Show flavor that shows up on the taskbar
问题描述
有没有办法来调用出现在任务栏的MessageBox.show?
Is there a way to call MessageBox.Show that appears in the taskbar?
这很可能是最好只创建一个自定义窗体并显示它当然,但作为一个懒惰的程序员我想避免重做默认的错误并提醒您得到一个良好的老式的MessageBox.show电话。通知图标
It would probably be best to just create a custom form and display it of course, but being a lazy programmer I want to avoid redoing the default Error and Alert notification icons you get with a good old fashioned MessageBox.Show call.
推荐答案
试试这个:
MessageBox.Show("Test", "Test", MessageBoxButtons.OK, MessageBoxIcon.Information, MessageBoxDefaultButton.Button1, MessageBoxOptions.DefaultDesktopOnly);
查看 MessageBoxOptions 枚举。
注意:有一些多线程副作用的这一用法,请参阅文章<一个href="http://alt.pluralsight.com/wiki/default.aspx/Keith.GuideBook/HowToDisplayAUserInterfaceFromADaemon.html"相对=nofollow>如何显示用户界面有一个守护进程。
Note: There are some multi threading side effect to the usage of this, see the article How To Display A User Interface From A Daemon.
这篇关于的MessageBox.show味,显示了在任务栏上的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!