Good morning,
I have a window with a Key event (pbm_keydown) with the following code to call the help:
IF KeyDown(KeyF1!) THEN
pb_help.TriggerEvent(Clicked!)
END IF
Inside the window I have many objects of all kinds (dw, st, tab, btn,...) and the help does NOT always work when F1 is pressed, and it depends on the object where the focus is.
The objects in the window do not have a coded key event, only the key event of the window itself is coded.
Does anyone have a solution, I want that whenever F1 is pressed it always executes the help code.
Thanks.
From the pfc_preopen of my w_master window:
// In order to make keyboard shortcuts available, create a hidden menu
if this.windowtype = Response! or this.WindowType = Child! then
If Not IsValid(This.menuId) Then
// Instantiate the menu
if This.ChangeMenu( m_response_retain_shortcut_keys ) = -1 then
return // must be the mdi frame ?
end if
lm = This.menuId
// Hide the menu and it's first level items lm.visible = False
For li_i = 1 To UpperBound(lm.item)
if lm.item[li_i].visible then
lm.item[li_i].visible = False
end if
Next
End if
end if
m_response_retain_shortcut_keys is a menu with all menu items invisible, but not disabled.
regards