VB6是否使用计时器检测按键? [英] VB6 Detecting Key presses using a timer?

查看:182
本文介绍了VB6是否使用计时器检测按键?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你好

我正在VB6中为一个大学项目工作,并且我使用计时器来检测按键,因此该代码最多每秒可以执行十次.

I am working in VB6 for a college project, and I am using a timer to detect key presses so that the code can only be executed up to ten times a second.

我创建了一个间隔为100的计时器,以使其每十分之一秒滴答"一声,但是我目前不确定如何从中检测按键.经过一段时间的Google搜索页面,我认为最好问一下 在这里.

I have created a timer with interval 100 so that it 'ticks' every tenth of a second, but I am currently unsure as to how I would go about detecting key presses from it. After a while of searching through pages on Google, I figured it would be best to ask here.

预先感谢.

推荐答案

您需要做的不是从计时器中检测到按键,而是抑制所有传入的按键直到计时器滴答作响
What you need to do is not to detect keypressed from within your timer, but to supress any incoming keypress until the timer ticks


这篇关于VB6是否使用计时器检测按键?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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