Skip to main content

How to trap the F10 event for an entire Dialog System window

  • February 15, 2013
  • 0 replies
  • 0 views

Problem:

How to trap the F10 event for an entire Dialog System window.

Pressing the F10 function key activates the menu in Windows by default, so coding the F10 event in Dialog may not work.

There is a Dialog System demo called TrapF10 (on the support site under Net Express example) that demonstrates trapping the F10 key for specific entry fields, but if you want to trap it for the entire window, another method can be used.

To trap F10 for the window (instead of individual entry fields), you have to define a shortcut key on a menu item. Define a menu item in the menu bar definition window (Edit Menu Bar) and specify a choice name. The choice name will relate to a window procedure that is named by the choice name and prefixed with an @ sign. In the shortcut key dropdown, choose F10. On the following window, you can specify "user defined action" so that the procedure named after the choice name is executed when the user presses the F10 function key. This should override the default Windows behavior when F10 is pressed.

Resolution:

How to trap the F10 event for an entire Dialog System window.

Pressing the F10 function key activates the menu in Windows by default, so coding the F10 event in Dialog may not work.

There is a Dialog System demo called TrapF10 (on the support site under Net Express example) that demonstrates trapping the F10 key for specific entry fields, but if you want to trap it for the entire window, another method can be used.

To trap F10 for the window (instead of individual entry fields), you have to define a shortcut key on a menu item. Define a menu item in the menu bar definition window (Edit Menu Bar) and specify a choice name. The choice name will relate to a window procedure that is named by the choice name and prefixed with an @ sign. In the shortcut key dropdown, choose F10. On the following window, you can specify "user defined action" so that the procedure named after the choice name is executed when the user presses the F10 function key. This should override the default Windows behavior when F10 is pressed.

Old KB# 6576

0 replies

Be the first to reply!