没有焦点时按键事件 [英] Key Press event when no focus

查看:94
本文介绍了没有焦点时按键事件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Hii,

我看到很多程序,可以在托盘中(在右下角

角落),他们可以获得Key Press活动,尽管他们不在
焦点。

有没有办法在C#windows应用程序中执行此操作?

谢谢,

Ofir。

解决方案




当然,它被称为系统挂钩,请查看
http:// www.codeproject.com/csharp/GlobalSystemHook.asp


" ofiras" < of **** @ gmail.comwrote in message

news:11 ********************** @ q75g2000hsh.googlegr oups.com ...


Hii,

我看到很多程序,可以在托盘中(右下角

角落),他们可以获得Key Press活动,虽然他们不在
焦点。

有没有办法在C#窗口中做到这一点申请?

谢谢,

Ofir。



6月20日,2 :下午38点,Ignacio Machin \(.NET / C#MVP \) < machin TA

laceupsolutions.comwrote:





当然,它被称为系统挂钩,请查看:http://www.codeproject.com/csharp/GlobalSystemHook.asp



新闻:11 ********************** @ q75g2000hsh.googlegr oups.com ...


Hii,

我看到很多程序,可以放在托盘中(在右下角

角落),他们可以获得Key Press活动,虽然他们不在

焦点。

有没有办法做到这一点在C#windows应用程序中?

谢谢,

Ofir。



非常感谢,这是我的意思的一半。

我不知道热到最小化形式尝试...

我该怎么做?

Ofir。





看看NotifyIcon


要从ALT + TAB列表中删除窗口,你需要P / invoke,I不要

这里有我的代码,但如果你查看档案,你会发现




" ofiras" ; < of **** @ gmail.comwrote in message

news:11 ********************** @ u2g2000hsc.googlegro ups.com ...


6月20日下午2:38,Ignacio Machin \(.NET / C#MVP \) < machin TA

laceupsolutions.comwrote:


>

当然,它'' s称为系统挂钩,看一看
http://www.codeproject.com/csharp/GlobalSystemHook.asp

" ofiras" < ofi ... @ gmail.com写信息

新闻:11 ********************** @ q75g2000hsh.googleg roups .com ...


Hii,

我看到了很多程序,可以放在托盘中(右下方) />
角落),他们可以获得Key Press活动,虽然他们不在
焦点。

有没有办法在C#windows应用程序中做到这一点?

谢谢,

Ofir。




非常感谢,这是我的意思的一半。

我不喜欢我知道很热,以尽量减少尝试的形式...

我该怎么做?

Ofir。



Hii,
I saw a lot of programs, that can be in tray (in the bottom right
corner), and they can get Key Press event although they are not in
focus.
Is there a way to do it in C# windows application?
Thanks,
Ofir.

解决方案

Hi,

Of course, It''s called "System hooks", take a look at
http://www.codeproject.com/csharp/GlobalSystemHook.asp

"ofiras" <of****@gmail.comwrote in message
news:11**********************@q75g2000hsh.googlegr oups.com...

Hii,
I saw a lot of programs, that can be in tray (in the bottom right
corner), and they can get Key Press event although they are not in
focus.
Is there a way to do it in C# windows application?
Thanks,
Ofir.



On Jun 20, 2:38 pm, "Ignacio Machin \( .NET/ C# MVP \)" <machin TA
laceupsolutions.comwrote:

Hi,

Of course, It''s called "System hooks", take a look athttp://www.codeproject.com/csharp/GlobalSystemHook.asp

"ofiras" <ofi...@gmail.comwrote in message

news:11**********************@q75g2000hsh.googlegr oups.com...

Hii,
I saw a lot of programs, that can be in tray (in the bottom right
corner), and they can get Key Press event although they are not in
focus.
Is there a way to do it in C# windows application?
Thanks,
Ofir.


Thanks a lot, it''s half of what I meant.
I don''t know hot to minimize the form to try...
How do I do it?
Ofir.


Hi,

Take a look at NotifyIcon

To remove the window from the ALT+TAB list you have to P/invoke , I do not
have the code here with me but if you look into the archives you will find
it

"ofiras" <of****@gmail.comwrote in message
news:11**********************@u2g2000hsc.googlegro ups.com...

On Jun 20, 2:38 pm, "Ignacio Machin \( .NET/ C# MVP \)" <machin TA
laceupsolutions.comwrote:

>Hi,

Of course, It''s called "System hooks", take a look
athttp://www.codeproject.com/csharp/GlobalSystemHook.asp

"ofiras" <ofi...@gmail.comwrote in message

news:11**********************@q75g2000hsh.googleg roups.com...

Hii,
I saw a lot of programs, that can be in tray (in the bottom right
corner), and they can get Key Press event although they are not in
focus.
Is there a way to do it in C# windows application?
Thanks,
Ofir.



Thanks a lot, it''s half of what I meant.
I don''t know hot to minimize the form to try...
How do I do it?
Ofir.



这篇关于没有焦点时按键事件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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