以编程方式按键 - 如何操作? [英] Programmatically Press Key - How to do it?

查看:74
本文介绍了以编程方式按键 - 如何操作?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用Visual Basic 2005 Express Edition。我正在尝试制作一个程序,在表单上的按钮(按钮1或其他任何名称)之后,程序将以编程方式连续按F1键开始。问题是,我不知道代码让它按下你的钥匙。有什么帮助?

I''m using Visual Basic 2005 Express Edition. I''m attempting to make a program that, after a button on the form (button1 or whatever I name it), the program will start programmatically pressing the F1 key continuously. The thing is, I don''t know the code to make it press a key for you. Any help?

推荐答案


我正在使用Visual Basic 2005 Express Edition。我正在尝试制作一个程序,在表单上的按钮(按钮1或其他任何名称)之后,程序将以编程方式连续按F1键开始。问题是,我不知道代码让它按下你的钥匙。有帮助吗?
I''m using Visual Basic 2005 Express Edition. I''m attempting to make a program that, after a button on the form (button1 or whatever I name it), the program will start programmatically pressing the F1 key continuously. The thing is, I don''t know the code to make it press a key for you. Any help?



在VB6中,它是 SendKeys 。您可以尝试查看已更改内容的升级信息。

In VB6 it was SendKeys. You could try looking in the upgrade info for things that have changed.



我正在使用Visual Basic 2005 Express Edition。我正在尝试制作一个程序,在表单上的按钮(按钮1或其他任何名称)之后,程序将以编程方式连续按F1键开始。问题是,我不知道代码让它按下你的钥匙。有帮助吗?
I''m using Visual Basic 2005 Express Edition. I''m attempting to make a program that, after a button on the form (button1 or whatever I name it), the program will start programmatically pressing the F1 key continuously. The thing is, I don''t know the code to make it press a key for you. Any help?



幸存下来。 :((我认为使用它表示设计不佳)

It survived. :( (I think that using it indicates poor design)

展开 | 选择 | Wrap | 行号



幸存下来。:((我认为用它表示设计不佳)
It survived. :( (I think that using it indicates poor design)



我不同意。你也可以对任何声明。这取决于你如何使用它。

I disagree. You might just as well say the same about any statement. It depends how you use it.

E xpand | 选择 | Wrap | 行号


这篇关于以编程方式按键 - 如何操作?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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