0

I want to assign F keys always to my program I assigned F1 key to maximize my program let say I open Firefox and my program minimized so when I press F1 key I want to maximize my program

1 Answers1

0

What you are looking for is called a Global Keyboard Hook. Basically your program will ask the operating system to notify it whenever keys are pressed. Support for this isn't built directly in to .net, but it can be accessed using p/invoke.

There is a very good example of it, along with VB.NET source code in this stack overflow question: How to listen keyboard in background and fire keystrokes on demand?

Community
  • 1
  • 1
Bradley Uffner
  • 16,641
  • 3
  • 39
  • 76