用我的按钮帮我。 [英] help me with my buttons.

查看:89
本文介绍了用我的按钮帮我。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个按钮,当它在图像框中加载图片时单击它。我希望它能够做到这一点,但是当它被点击两次时,我希望它转到表格3.任何人都可以为这个问题找到一些代码。

解决方案

尝试声明一个全局变量ctr

然后每次点击增量ctr然后如果ctr = 2

form3.show或喜欢的


可以工作但是我希望人们不止一次能够拍摄这张照片。是否可以像使用像dbl click这样的东西。



哪个会起作用,但我希望人们能够观看图像不止一次。是否可以使用像dbl click这样的东西。



命令按钮没有双击事件,但您可以尝试模拟它。例如,单击它时,您可以设置标志并启动计时器。当计时器事件触发时(例如,半秒后),您可以检查在该时间内是否再次单击该按钮。此外,在点击事件中,如果已经设置了标志,除了增加点击次数之外,不做任何事情。计数器。


I have a button that when clicked once it loads a picture in an image box. i want it to do that but when it is clicked twice i want it to goto a form 3. Can anyone right some code for this problem.

解决方案

try declaring a global variable ctr
then per click increment ctr then if ctr = 2
form3.show or the likes


that would work but i want people to be able to viw the image more than once. is it posible to do something like use something like the dbl click.


that would work but i want people to be able to viw the image more than once. is it posible to do something like use something like the dbl click.

The command button doesn''t have a double-click event, but you might try simulating it. For example, when it is clicked, you could set a flag and start a timer. When the timer event fires (after half a second, for example) you can check whether the button was clicked again within that time. Also, in the click event, if the flag is already set, don''t do anything except increment the "number of times clicked" counter.


这篇关于用我的按钮帮我。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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