C#版本的MB_SYSTEMMODAL [英] C# version of MB_SYSTEMMODAL

查看:79
本文介绍了C#版本的MB_SYSTEMMODAL的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在寻找一种将消息框或类似内容强制显示在顶部/顶部的方法,这样即使我的程序没有集中精力,我的错误消息也仍然会显示并必须得到响应.就像旧的MB_SYSTEMMODAL一样.我的程序需要继续响应正在进行的事件,如果隐藏了错误消息,我的程序将错过事件.
是的,我意识到MB_SYSTEMMODAL有点粗鲁,但最好还是粗鲁,然后让人们继续认为程序正在捕获数据,直到为时已晚. 在此先感谢

I am looking for a way to force a message box or something like it to the top / front so that even if my program did not have focus my error message will show and have to be responded to . Like the old MB_SYSTEMMODAL. My program needs to keep responding to ongoing events and if the error message is hidden my program will miss the events.
Yes I realize that MB_SYSTEMMODAL was a bit rude but better to be rude then to let people go on thinking the program was capturing data until it was too late to fix anything.
Thanks In Advance

推荐答案

您可以:

0)当需要显示错误对话框时,将您的应用置于最高位置

1)创建自己的消息框类(从.Net派生),并在类上将toptop设置为true
You could:

0) force your app to be topmost when an error dialog needs to be displayed

1) Create your own messagebox class (derived from the .Net one), and set topmost to true on your class


这篇关于C#版本的MB_SYSTEMMODAL的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆