我如何检查是否已按下按钮? [英] How can i check if a button has been pressed?

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

问题描述



我正在使用Visual Basic 2008 Express Edition制作软件.我想知道如何检查是否按下了按钮?
我有两个按钮,在此示例中为button1和button2.如果有人按下button2,我该如何检查他们在单击button2之前是否先单击button1?



i am using visual basic 2008 express edition to make a software. i wanted to know how i can check if a button is pressed?
i have two buttons, for this example, button1 and button2. if someone presses button2, how can i check if they have clicked button1 before clicking button2?

推荐答案

有类似 Button Click事件之类的东西.
如果按下特定按钮,则可以引发此事件.如果以及何时抬起,这可以告诉您单击了哪个按钮.

在这里阅读所有相关信息: Button.Click事件 [^ ]
(链接是基于Web的,但是如果Windows App需要,该概念将保持不变.)
There is something like Button Click event.
If you press a particular button then this event can be raised. If and when raised, this can tell you which button was clicked.

Read all about it here: Button.Click Event[^]
(Link is of Web, but the concept remains same if needed for Windows App.)


这篇关于我如何检查是否已按下按钮?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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