Single vs. Doucble Click [英] Single vs. Doucble Click

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

问题描述

我想在一个图标上有三个状态...


左键单击

右键单击

双击


左键单击在双击上至少触发一次


是否有一个很好的例子,说明如何确定用户是否输入了

左键单击还是双击?


-

- Thom Little - www.tlaNET.net - Thom Little Associates,Ltd。

-

I would like three states on an icon ...

Left Click
Right Click
Double Click

Left Click is fired at least once on a Double Click

Is there a good example that shows how to determine if the user entered a
Left Click or a Double Click?

--
-- Thom Little -- www.tlaNET.net -- Thom Little Associates, Ltd.
--

推荐答案

我不确定你使用的是什么控件,但我最好的建议是从你想要的控件中得到
使用,并让它只是它的图片框

控制。我想在onClick和onDoubleClick方法中添加你想要跟踪的三个属性,以及

。我会修改这三个属性的状态。

Keenan

Thom Little <第** @ tlanet.net>在消息中写道

news:%2 ****************** @ TK2MSFTNGP12.phx.gbl ...
I am not sure what control you are using but my best suggestion would be to
derive from the control you want to use, and lets just it''s the picturebox
control. I would add the three properties you want to keep track of, and
within the onClick, and onDoubleClick methods. I would modify the state of
those three properties.
Keenan
"Thom Little" <th**@tlanet.net> wrote in message
news:%2******************@TK2MSFTNGP12.phx.gbl...
我想在一个图标上有三个状态...

左键单击
右键单击
双击

左键单击至少触发一次双击

是否有一个很好的例子,说明如何确定用户是否进入了左键单击或双击?

- Thom Little - www.tlaNET.net - Thom Little Associates,Ltd。
-
I would like three states on an icon ...

Left Click
Right Click
Double Click

Left Click is fired at least once on a Double Click

Is there a good example that shows how to determine if the user entered a
Left Click or a Double Click?

--
-- Thom Little -- www.tlaNET.net -- Thom Little Associates, Ltd.
--



也许等待一段时间来查看下一次点击是否来了?

您无法在事件处理程序中执行此操作,但必须使用

启动进程。这将被双击取消。

也许启动一个计时器并在计时器事件中设置点击图标,并在

双击事件中停止计时器。 />
HTH

JB


Thom Little <第** @ tlanet.net>在消息中写道

news:%2 ****************** @ TK2MSFTNGP12.phx.gbl ...
Maybe wait for a set period to see if the next click comes?
You would not be able to do this in the event handler but would have to
start a "process" that would be cancelled by the double click.
Maybe start a timer and in the timer event set the click icon and in the
double click event stop the timer.
HTH
JB

"Thom Little" <th**@tlanet.net> wrote in message
news:%2******************@TK2MSFTNGP12.phx.gbl...
我想在一个图标上有三个状态...

左键单击
右键单击
双击

左键单击至少触发一次双击

是否有一个很好的例子,说明如何确定用户是否进入了左键单击或双击?

- Thom Little - www.tlaNET.net - Thom Little Associates,Ltd。
-
I would like three states on an icon ...

Left Click
Right Click
Double Click

Left Click is fired at least once on a Double Click

Is there a good example that shows how to determine if the user entered a
Left Click or a Double Click?

--
-- Thom Little -- www.tlaNET.net -- Thom Little Associates, Ltd.
--



你好,


根据我的理解,你想要的区分左键单击双击

点击。


你能告诉我你的图标是什么吗?它是一个WinForm控件吗?


对于一个控件,你可以通过Control.Click事件和

DoubleClick事件处理它。或者您可以覆盖控件,在OnClick

和OnDoubleClick保护方法中处理。


这是否满足您的需求?


感谢您的耐心与合作。如果您有任何疑问或

担忧,请随时将其发布在小组中。我正准备等待

的帮助。


祝你好运,

Jeffrey Tan

Microsoft在线合作伙伴支持

安全! - www.microsoft.com/security

此帖子按原样提供没有保证,也没有赋予任何权利。

Hi Thom,

Based on my understanding, you want to distinguish left click with double
click.

Can your tell me what is your "icon"? Is it a WinForm control?

For a control, you may handle this through Control.Click event and
DoubleClick event. Or you may override the control, handle in both OnClick
and OnDoubleClick protected method.

Does this meet your need?

Thank you for your patience and cooperation. If you have any questions or
concerns, please feel free to post it in the group. I am standing by to be
of assistance.

Best regards,
Jeffrey Tan
Microsoft Online Partner Support
Get Secure! - www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.


这篇关于Single vs. Doucble Click的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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