ESC key blanks out MDI Child dialog

ESC key blanks out MDI Child dialog

Postby Rick Lipkin » Wed Sep 21, 2011 9:20 pm

To ALL

I have a dialog embedded within a mdi child and when you hit the escape key .. the dialog box disappears and leaves a grey mdi child frame.

This has bothered me for some time but it rarely ever cropped up in production. Just curious if anyone has found a work around ( other than turning off the escape key ) to knit both the dialog to the mdi frame together .. so that either nothing would happen or the escape key could trip a valid close ?

Thanks
Rick Lipkin

ps .. I have tried this code with the same results where oWnd1 is the mdi child:

Code: Select all  Expand view  RUN

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




Image

Image
User avatar
Rick Lipkin
 
Posts: 2666
Joined: Fri Oct 07, 2005 1:50 pm
Location: Columbia, South Carolina USA


Re: ESC key blanks out MDI Child dialog

Postby Rick Lipkin » Thu Sep 22, 2011 1:00 pm

Enrico

Thank you .. I plugged your solution into the valid clause on the activate dialog line and it worked ..

Many Thanks
Rick
User avatar
Rick Lipkin
 
Posts: 2666
Joined: Fri Oct 07, 2005 1:50 pm
Location: Columbia, South Carolina USA


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: Google [Bot], MaxP and 61 guests