|
-
Jun 3rd, 2005, 03:03 PM
#1
Thread Starter
Frenzied Member
[RESOLVED] how to bridge special key press from datagrid to form (resolved)
Dear all,
i have a form, i want to give it some hot keys functionality, so i did the following :
1 - i set the keypreview of the form to true
2 - in the keyup event i set a select case based on the e.keycode , like this
VB Code:
select case e.keycode
case 112
'save code
case 113
'delete code
case 114
'add new code
end select
it works fine, but !!!!!
when i have a datagrid on the form, and the focus is on the grid none of these hotkeys triggers anything.
when i move the focus to any other control on the form , the hot keys works well. i think the datagrid blocks the key strokes inside it assuming that i am editing inside its cells.
what i need now is to alter the keyup event on the datagrid and check if any of the keys i want (hot keys) is pressed , then i want to send the same keys to the form itself.
i don't want to activite my subs directly from the grid, i just want to bridge the keys from the grid to the form, and let the form handle it.
why want i do that in specific, because this is the base form of a project and during inheriting i may have different forms responding deifferently from each other.
Can i pass some special keys from the grid to the form (F1, F2 etc...), and How ????
thx in advance
RGDS
Last edited by maged; Jun 5th, 2005 at 02:53 PM.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|