Skip to Content
Former Member
Jun 27, 2014 at 02:22 PM

shortcut key from menu on main window


Good day

I have windows of type main which have many resize events on the datawindows residing on it and space is tight. It sits outside our main app container which has a menu control.

I require some of the shortcut key functionality we have there on these other windows without the menu being displayed. Discovered the following code on the web although the menu control is indeed hidden it is still adjusting the height of the window (which cannot be any higher) and messing with my resize functionality.

Is there a way to stop the changemenu method from adjusting the height or indeed another means of solving this issue?

/* in order to make keyboard shortcuts available, create a hidden menu */

if not isvalid(this.menuid) Then

ll_winheightadjust = this.height

/* instantiate the menu */


lm_id = this.menuid


//this.ToolbarAlignment = AlignAtRight!

/* hide the menu and it's first level items */

lm_id.visible = false

for ll_index = 1 to upperbound(lm_id.item)

lm_id.item[ll_index].visible = false


ll_winheightadjust = this.height - ll_winheightadjust // 152

end if

I tried initially the window event keydown, but I lose the shortcut if I jump to another application and return.

Does anyone have any ideas?

Thank you in advance


PowerBuilder 12.1, MS Windows 7