任何人都可以建议我。如何禁用“”中的任何按钮MessageBox“ [英] Can anyone suggest me. how to disable any button in the " MessageBox "

查看:89
本文介绍了任何人都可以建议我。如何禁用“”中的任何按钮MessageBox“的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有自动关闭MessageBox的源代码。我只想禁用MessageBox中的任何按钮。



我的代码如下:

i have source code for automatic closed MessageBox. i just want to disable any button in MessageBox.

My code like this :

public void CloseIt()
   {
       System.Threading.Thread.Sleep(5000);
       Microsoft.VisualBasic.Interaction.AppActivate(
            System.Diagnostics.Process.GetCurrentProcess().Id);
       SendKeys.SendWait(" ");
   }





按钮_点击这样:





in the button_Click like this :

(new System.Threading.Thread(CloseIt)).Start();

          MessageBox.Show("Help me please...");

推荐答案

只需创建自己的MessageBox表单即可完全控制并使用它。
Just create your own "MessageBox" form which you can have full control of and use that.


谢谢你的回答。

我会工作的。但我只是想知道如何......
Thank you for answer.
I''ll work it. but i just want to know how to ...


这篇关于任何人都可以建议我。如何禁用“”中的任何按钮MessageBox“的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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