Click here to Skip to main content
15,895,462 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hello to all.

I have application that gets information from database.

Whats i need to do is

My application will work in task manager and get the data by keyboard combination.

for example :

no matter where i will be in the windows the combination :

F1+ALT will show me massageBox with data1
F2+ALT will show me massageBox with data2

and so on...

i heard that i need to use hook functions but whats the right way to use them or maybe that is a batter way to do it

my app made in : windows forms application, VB.NET

Thank you.
Posted
Updated 4-Jan-15 4:49am
v5
Comments
Maciej Los 4-Jan-15 12:06pm    
Why do you want to fetch data by catching keys combination? It makes no sense. Create top menu (for example: ribbon) instead.
[no name] 5-Jan-15 0:53am    
Its part of big application that needs to do that option.

1 solution

Yes, you need global keyboard hooks - but frankly, VB is a poor choice (and C# is not a lot better) - you would find it a lot easier in a native language such as C++.

But...there are a lot of articles on the subject: Google: "global keyboard hook site:codeproject.com"[^] so you have a fair amount of reading to do.

Be aware that you will probably mess up quite a lot of applications with this idea...ALT and Function keys are used quite often.
 
Share this answer
 
Comments
[no name] 5-Jan-15 0:54am    
Thank you.
OriginalGriff 5-Jan-15 5:24am    
You're welcome!

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