Link to home
Start Free TrialLog in
Avatar of fh2
fh2

asked on

Accessing Shortcut Key

How can I access the Shortcut Key of a menu item in Delphi 5.0?
Avatar of Mike Littlewood
Mike Littlewood
Flag of United Kingdom of Great Britain and Northern Ireland image

Do you mean how can you assign a shortcut key to a menu item?
There is a property called ShortCut for every menu item which you can assign.

or do you mean setting the caption of a menu item to include a shortcut key?
You can set the caption to be something like &File which will display File with the F underlined just like any normal window shortcut.
Then just do the usual menu selection by pressing ALT and then all the shortcut underlined letters until you get to the item you want.
Avatar of fh2
fh2

ASKER

How can I access the event of a shortcut key? (When a user uses a shortcut key to access a menu item)
ASKER CERTIFIED SOLUTION
Avatar of Mike Littlewood
Mike Littlewood
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Take a look at the packed record structure for TWMKey to gather information as to the shortcut itself.