如何以vb.net形式捕获Alt + tab键 [英] How to Capture Alt+tab keys in vb.net form

查看:309
本文介绍了如何以vb.net形式捕获Alt + tab键的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



每当我打开应用程序登录页面时,我都会通过vb.net代码将桌面分辨率动态更改为(1024,768).现在,每当从应用程序登录屏幕上按ALT + tab键时,我都需要将分辨率更改为原始分辨率.我需要在登录表单的keydown事件中捕获ALT + tab.我编写了代码,但keydown事件未捕获Tab键.因此,请为此提供帮助.

Hi,

I am changing the Desktop resolution to (1024,768) dynamically through vb.net code whenever my application login page get opened.Now i need to change the resolution to original resolution whenever ALT+tab keys are pressed from my application login screen.So i need to capture the ALT+tab in keydown event of my login form.I wrote the code but keydown event is not capturing Tab key.So please help me with this.

推荐答案

您根本不需要这样做.

更改屏幕分辨率绝对不是一个好主意,因为这会影响计算机上运行的所有其他应用程序,并且在执行此操作时也会完全更改用户桌面图标的布局.

也尝试在多监视器设置中执行此操作,问题将变得更加严重.您将如何知道您的应用程序在哪个监视器上并跟踪您要更改的监视器?
You shouldn''t need to do this AT ALL.

Changing the screen resolution is a HUGELY bad idea because you affect all other applications running on the machine and you also completely change the layout of the users desktop icons when you do that.

Try doing this in a multiple monitor setup too and the problem gets even worse. How are you going to know which monitor your app is on and track which one you''re going change??


我想只要您的表单被停用,您就想重置重排.如果是这样,则可以使用以下形式的Deactivate事件:....
I think whenever your form get deactivated then you want to reset the reoslution. If it is, than you can use Deactivate event of form.....


这篇关于如何以vb.net形式捕获Alt + tab键的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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