Event: EventFuncKeyPressed for Dialog

DIAdem 2018 Help


Edition Date: June 2018
Part Number: 370858P-01
View Product Info

DOWNLOAD (Windows Only)


DIAdem 2017 Help
DIAdem 2018 Help
DIAdem 2019 Help
DIAdem 2020 Help
DIAdem 2020 SP1 Help

Triggers in user dialog boxes when a function key is pressed. You can use this event anywhere, for any purpose.

EventFuncKeyPressed(ByRef This, KeyName, Ctrl, Shift, ByRef DoProceed)
This Object that triggers this event.
KeyName Name of the function key that is pressed. The name can range from "F1" to "F24".
Ctrl Specifies whether <Ctrl> is pressed at the same time.
Shift Specifies whether <Shift> is pressed at the same time.
DoProceed Specifies whether the user dialog box processes the shortcut.

The following example displays a message that depends on which function key the user presses in the dialog box:

Sub Dialog_EventFuncKeyPressed(ByRef This, KeyName, Ctrl, Shift, ByRef DoProceed)
  Select Case KeyName
    Case "F1"
      Call MsgBoxDisp("F1 pressed")
    Case "F2"
      Call MsgBoxDisp("F2 pressed, Ctrl: "& Ctrl & ", Shift: "&Shift)
    Case Else
      Call MsgBoxDisp("KeyName: " & KeyName)
  End Select
End Sub

WAS THIS ARTICLE HELPFUL?

Not Helpful