Click here to Skip to main content
15,888,175 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
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.
Posted
Updated 18-Apr-18 6:55am
Comments
[no name] 18-Apr-18 9:49am    
So you are going for a KeyLogger? There are plenty of examples in the net.

1 solution

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.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900