消息框在C# [英] MessageBox in c#

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

问题描述

我要显示消息框给用户,使得用户不能拒绝确认该消息框。用户不应该被允许,直到他确认消息框做任何事情在屏幕东西。

I want to show messagebox to the user, such that the user cannot refuse to confirm the message box. User should not be allowed to do anything else in the screen until he confirms the messagebox.

这是一个基于Windows的C#应用​​程序。

This is a windows based c# application.

最主要的是,即使我用windows消息框。有时候它背后隐藏的一些屏幕。但对于我而言,我想消息框上时,它似乎最顶端。

The main thing is, even if i use windows message box. Some times it is hiding behind some screen. But for my case, i want message box to be on top most whenever it appears.

我使用一些其他的第三方应用程序,这在我的游乐设施消息框。我要克服这一点。

I am using some other third party applications, which over rides my message box. I want to overcome this.

如何做到这一点...

How to do this...

推荐答案

您必须创建自己的表单,使其模态,改变Z-以使其始终在最前面,并捕获所有的键盘和鼠标操作。

You will have to create your own form, make it modal, change the z-order to make it always on top, and capture all keystrokes and mouse clicks.

总在最前面:的 http://www.codeguru.com/cpp/wd/dislog/article.php/c1857

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

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