winforms中的击键应用C# [英] Keystroke application in winforms C#
本文介绍了winforms中的击键应用C#的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
大家好,
我在c#中创建了一个关于按键的winforms应用程序。
winform将opecity设置为0%并且showTaskbar = false;
问题:
应用程序仅在焦点上运行。
我尝试了什么:
如何让它在失去焦点的情况下运行。
任何人都可以帮助我。
提前致谢。
解决方案
请参阅此处的CodeProject文章:使用C#处理全局鼠标和键盘挂钩 [ ^ ]
但请注意.NET32及更高版本对来自kernel32的托管方法 GetModuleHandle 的评论的.dll
Hi Guys,
I have created one winforms application in c# regarding keystroke.
The winform will opecity was set to 0% and showTaskbar = false;
Problem:
The application is running only on focus.
What I have tried:
how can i make it run on lost focus.
Can anyone please help me.
Thanks in advance.
解决方案
See CodeProject article here: Processing Global Mouse and Keyboard Hooks in C#[^]
But note the comment for .NET 4.5 and higher about the managed method GetModuleHandle from the kernel32.dll.
这篇关于winforms中的击键应用C#的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文