Page 1 of 1

terminate MDI child windows with <vk_escape>

Posted: Thu May 02, 2013 6:52 pm
by don lowenstein
I created an MDI window with 2 mdichild windows.

My child windows require clicking the close "X" button to shut them down.

how can I make the escape key shut down/close each MDICHILD windows without having to touch the mouse?

thank you

Re: terminate MDI child windows with <vk_escape>

Posted: Thu May 02, 2013 7:47 pm
by Rick Lipkin
Don

This code snipit should work..

Rick Lipkin

Code: Select all

   // key handler to trap key strokes  ESC to quit  //
   oWind:bKeyDown := {|nKey| IF(nKEY = 27, oWIND:END(), ) }
 

Re: terminate MDI child windows with <vk_escape>

Posted: Thu May 02, 2013 8:42 pm
by don lowenstein
Worked like a charm.

Thanks Rick.