I have a question about a problem I haven't been able to solve in the past couple hours. So basically I want to make a C# WinForm app in .NET 6, and I need the app to respond to the ctrl key being pressed (It would simulate what a click of a certain button would do), but there is a catch. I need the app to sense a key pressed while being minimized. When the app is in normal state it is working, but not when minimized. A lot of other answers here were old, so I wanted to make my own, since none of the solutions worked for me, and the code was quite complicated. Thank you for any responses.
Asked
Active
Viewed 784 times
0
-
What have you tried thusfar? – demoncrate Feb 21 '22 at 11:44
-
@demoncrate I have tried a lot of guides here on stack overflow, as well as on youtube and some tutorials on this topic from the web. – AGlasencnik Feb 21 '22 at 19:05
-
you should look for global keyboard hook events that are accessed using references to C code. Or otherwise some background service that you communicate with. – demoncrate Mar 14 '22 at 13:10
-
You want to build a key logger type of application it seems. Look into that. – demoncrate Mar 14 '22 at 13:10
-
Thanks for the answer but I have already figured it out quite some time ago but forgot to post an answer here. – AGlasencnik Mar 15 '22 at 18:41
1 Answers
0
-
Thanks for your initiative in coming back here and posting the location of the solution. It helped me a lot! – Diego Sayron Nov 25 '22 at 13:36
-
@DiegoSayron no problem, I still go here to see the solution to the same problem ;) – AGlasencnik Nov 25 '22 at 19:09