如何在主屏幕上显示MessageBox.Show? [英] How do I do MessageBox.Show on primary screen?
本文介绍了如何在主屏幕上显示MessageBox.Show?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
是否有可能在主屏幕上显示MessageBox
,而不必在运行应用程序的屏幕上显示MessageBox
?
Is there any possibility to show a MessageBox
on the Primary Screen, not necessarily on the screen where the application is running?
推荐答案
您可以尝试MessageBoxOptions.DefaultDesktopOnly
:
MessageBox.Show("Hello World", "Caption", MessageBoxButtons.OK, MessageBoxIcon.Information, MessageBoxDefaultButton.Button1, MessageBoxOptions.DefaultDesktopOnly);
对我来说效果很好,但没有使用默认的Windows视觉样式呈现消息框.
Works pretty well for me, but doesn't render the message box with the default visual style of Windows.
这篇关于如何在主屏幕上显示MessageBox.Show?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文