Hello,
I'm trying to assign shortcuts keys in my program. The only solution i found is to create a menu item and set its shortcut key property... Problem is that it is just not right... i dont need a menu... so why create one for just a shortcut...
Using the keys events is also not useful because i need the shortuct to be active for each of my controls in the form...
The best idea i had is to create a key logger that will catch all keys pressed in the OS and check if the form is in foucs, but i rather evoid that...
Any ideas? (Using .Net 2 Only)
Thanks!!!

Guest UserRank #1,422 · 1.2K reputationPosted Dec 16, 2008, 10:44 AM EST
Why not use a menu to set up your shortcut keys and their events, and then set the Visible property of the menu control to False?
nir malbin3 reputationPosted Dec 17, 2008, 11:25 AM EST
The idea of creating an object that his purpose is to be a menu and use it for a shortcut... its ugly.
I thought about something nice. I'll write a class that takes a control and signs up to all of his controls keys events...
This is the best idea so far...
Guest UserRank #1,422 · 1.2K reputationPosted Dec 17, 2008, 12:01 PM EST