问题描述
我正在尝试使用一个 sendkey 事件,该事件持有 ALT 键,然后按 TAB 键.您如何执行该操作,我尝试了很多变体,但似乎找不到答案,谢谢.
I am trying to use a sendkey event that holds the ALT key and then presses the TAB key. How do you perform that action, I've tried many variations but I can't seem to find the answer, thanks.
推荐答案
使用 sendkeys PInvoke 可以通过发送 ALT keydown 事件,TAB keydown,然后 TAB keyup,然后 ALT keyup 来做到这一点.还有另一种在键上使用 ALT 修饰符的方法,但我不记得确切的方式,因为我有一段时间没有使用它了.
Using sendkeys PInvoke it's possible to do this by sending ALT keydown event, TAB keydown, then TAB keyup, then ALT keyup. There is also another way using the ALT modifier on the key but I cannot remember exactly how as I haven't worked with it in a while.
如果您想在保持 ALT 为 keydown 的同时交替使用 TAB 键和键.
If you want to do multiple tabs alternate the TAB keydown and keyup while keeping the ALT on keydown.
这篇关于如何在 C# 中执行按住 ALT+TAB 发送键事件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!


大气响应式网络建站服务公司织梦模板
高端大气html5设计公司网站源码
织梦dede网页模板下载素材销售下载站平台(带会员中心带筛选)
财税代理公司注册代理记账网站织梦模板(带手机端)
成人高考自考在职研究生教育机构网站源码(带手机端)
高端HTML5响应式企业集团通用类网站织梦模板(自适应手机端)