terminate MDI child windows with <vk_escape>

Post Reply
User avatar
don lowenstein
Posts: 196
Joined: Mon Oct 17, 2005 9:09 pm
Contact:

terminate MDI child windows with <vk_escape>

Post 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
Don Lowenstein
www.laapc.com
User avatar
Rick Lipkin
Posts: 2397
Joined: Fri Oct 07, 2005 1:50 pm
Location: Columbia, South Carolina USA

Re: terminate MDI child windows with <vk_escape>

Post 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(), ) }
 
User avatar
don lowenstein
Posts: 196
Joined: Mon Oct 17, 2005 9:09 pm
Contact:

Re: terminate MDI child windows with <vk_escape>

Post by don lowenstein »

Worked like a charm.

Thanks Rick.
Don Lowenstein
www.laapc.com
Post Reply