Results 1 to 9 of 9

Thread: [RESOLVED] how to bridge special key press from datagrid to form (resolved)

Threaded View

  1. #1

    Thread Starter
    Frenzied Member maged's Avatar
    Join Date
    Nov 2002
    Location
    Egypt
    Posts
    1,040

    Resolved [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:
    1. select case e.keycode
    2.  
    3. case 112
    4.    'save code
    5. case 113
    6.    'delete code
    7. case 114
    8.  'add new code
    9. 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
  •  



Click Here to Expand Forum to Full Width