如何处理WinForms控件点击事件,当它不是双击 [英] How to handle WinForms control click event when it's not a double click

查看:152
本文介绍了如何处理WinForms控件点击事件,当它不是双击的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要区分单击和双击,但我需要在点击事件期间这样做。我需要这个,因为如果有一个单击我想调用函数A,如果有一个双击我想调用函数B.但函数A必须调用只有在单击。

I need to differentiate between a single click and a double click but I need to do this during the click event. I need this because if there's a single click I want to call Function A and if there's a double click I want to call Function B. But Function A must be called only in case of a single click.

如何使用C#(或VB)中的标准Winforms实现这一点?

How may I achieve this using standard Winforms in C# (or VB)?

推荐答案

点击可以单独处理

点击 - > http://msdn.microsoft.com/en-US/library/system.windows.forms.control.click(v = vs.80 ).aspx

双击 - > http://msdn.microsoft.com/en-US/library/system.windows.forms.button.doubleclick(v = vs80).aspx

这篇关于如何处理WinForms控件点击事件,当它不是双击的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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