Results 1 to 3 of 3

Thread: Monitoring keydown events in MDI form?

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Mar 2012
    Posts
    290

    Monitoring keydown events in MDI form?

    I've a mdiform where sometimes a mdichild (one or more) are loaded and sometimes there isn't any mdichild form loaded.

    I want to use keyboard shortcuts for specific tasks (for example control+B to show a mdichild, alt+2 to change graphic parameters of an opened mdichild, etc). I've been looking in the forum and some guy said to use a picturebox control in the background of the mdiform and at the end of the keydown event use
    Code:
    Picture1.SetFocus
    The problem is when I use that solution, no mdichild form can be seen on the mdiform. I think the mdichild is behind of the picturebox control.

    So, what solution can I use? Remember that the mdiform has some key shortcuts and the mdichild forms have different key shortcuts.

  2. #2

    Thread Starter
    Hyperactive Member
    Join Date
    Mar 2012
    Posts
    290

    Re: Monitoring keydown events in MDI form?

    When I open the menu editor in the design time and I assign a key shortcut it's not needed to use any extra code. In runtime I press the key combination and it triggers the part of the code associated with that key shortcut.

    My question now is: if I want to use a different combination of keys that are not present in the menu editor in the design time (like alt + 1). What do I should do?

  3. #3
    Frenzied Member
    Join Date
    Jun 2014
    Posts
    1,084

    Re: Monitoring keydown events in MDI form?

    try setting the picture's allignment to top
    and its height to 0 (zero)
    do not put off till tomorrow what you can put off forever

Tags for this Thread

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