vb.net - MDI menu shortcut not working while other Form active -
my project have mdi form , 's have menu many shortcut shortcut work fine while 's focus when open form shortcut stop working because mdi form not active how can send keyboard press mdi form trigger menu shortcut
this how open child window
frmchild.owner = me frmchild.show()
i make key press , key down events static , public , them in key press ,key down in child form 's work , sent keyboard input mdi form menu shortcut never trigger.
frmmdi
public shared sub frmmdi_keydown(sender object, e keyeventargs) handles me.keydown end sub
frmchild
private sub frmchild_keydown(sender object, e keyeventargs) handles me.keydown frmmdi.frmmdi_keydown(sender, e) end sub
thanks.
you don't need call in child keydown handler mdiparent keydown handler. menu shortcut of parent work without this. reason it's not working because should have
frmchild.mdiparent = me
instead of
frmchild.owner = me
Comments
Post a Comment