如何使用“鼠标右击双击事件”关闭()窗口形式? [英] How to use "Right mouse double click event" to Close() window form?

查看:180
本文介绍了如何使用“鼠标右击双击事件”关闭()窗口形式?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在表单标题中,我想禁用退出按钮并使用事件:鼠标右键双击而不是。



你能给我任何代码吗? />
我正在使用C#。

谢谢!

In the form title, i wanna disable Quit button and use event: Right mouse double click instead of.

Can you give to me any code?
i'm using C#.
Thanks!

推荐答案

没有定义这样的现成函数或事件处理程序这样做

你必须做一个

你可以这样做

我试过这个。



使用鼠标双击活动

并使用以下代码



There is no such ready made function or event handler defined to do so
you have to make one
You can do this
I have tried this.

Use Mouse Double Click Event
And Use The Following Code

private void label1_MouseDoubleClick(object sender, MouseEventArgs e)
       {
           if(e.Button==MouseButtons.Right)
           {
               MessageBox.Show("Close Application Code Goes Here");
           }
       }


这篇关于如何使用“鼠标右击双击事件”关闭()窗口形式?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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