如何在C#中捕获Alt-Tab等? [英] How to catch Alt-Tab and such in C#?

查看:62
本文介绍了如何在C#中捕获Alt-Tab等?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

一个朋友正在尝试编写与Windows 3.1早期版本完全不同的旧wintutor.exe文件.它的目的是向某些完整的新手介绍WinXP的使用方法,本教程需要对 Alt + Tab 作出回应,以保护自己.您如何在C#Winforms中做到这一点?

A friend is trying to write something not entirely unlike the old wintutor.exe from the olden days of Windows 3.1. It's meant to show some complete newbs the ropes of using WinXP, and the tutorial needs to respond to Alt + Tab and such for their own protection. How do you do this in C# Winforms?

推荐答案

我没有这样做的第一手经验,也不知道现在是否有更简单的方法,但是此CodeProject文章讨论了使用C#来捕获将捕获键盘笔触的低级Windows API ,例如 Alt + Tab .

I have no first-hand experience doing this and I don't know if there's an easier way now, but this CodeProject article discusses using C# to tap low-level Windows APIs that will trap keyboard strokes like Alt + Tab.

这篇关于如何在C#中捕获Alt-Tab等?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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