I need to trap the closing of a form and do some cleanup before releasing it.
I found ON KEY ESCAPE ACTION MIExit() works very well to trap the Esc key.
How do I call MIExit() if the user closes the form with the red X?
Trap closing .FMG
Moderator: Rathinagiri
- danielmaximiliano
- Posts: 2612
- Joined: Fri Apr 09, 2010 4:53 pm
- Location: Argentina
- Contact:
Re: Trap closing .FMG
On Interactive Close
HMG Reference in file:///C:/hmg.3.2/doc/data/index.htm
HMG Reference in file:///C:/hmg.3.2/doc/data/index.htm
*´¨)
¸.·´¸.·*´¨) ¸.·*¨)
(¸.·´. (¸.·` *
.·`. Harbour/HMG : It's magic !
(¸.·``··*
Saludos / Regards
DaNiElMaXiMiLiAnO
Whatsapp. := +54901169026142
Telegram Name := DaNiElMaXiMiLiAnO
¸.·´¸.·*´¨) ¸.·*¨)
(¸.·´. (¸.·` *
.·`. Harbour/HMG : It's magic !
(¸.·``··*
Saludos / Regards
DaNiElMaXiMiLiAnO
Whatsapp. := +54901169026142
Telegram Name := DaNiElMaXiMiLiAnO
- mustafa
- Posts: 1160
- Joined: Fri Mar 20, 2009 11:38 am
- DBs Used: DBF
- Location: Alicante - Spain
- Contact:
Re: Trap closing .FMG
Hola bzncrew:
As said the friend Daniel ---> (Como ha dicho el amigo Daniel )
ON INTERACTIVECLOSE {||.F. }
Sample
DEFINE WINDOW Form_10 ;
AT 0,0 ;
WIDTH 1200 HEIGHT 700 ;
TITLE "Web Design Experts" ;
ICON 'Logo' ;
NOSIZE TOPMOST NOMINIMIZE NOMAXIMIZE ;
MAIN ;
FONT "Arial" SIZE 10 BACKCOLOR { 211,218,236 } ;
ON INIT password_control() ;
ON INTERACTIVECLOSE {||.F. } <----------- OK !
ON KEY ESCAPE ACTION FinalProgram()
ON KEY ALT+F4 ACTION ( MsgStop( 'Alt+F4 - Not Allowed', 'Attention !!!') , NIL )
Regars
Mustafa
As said the friend Daniel ---> (Como ha dicho el amigo Daniel )
ON INTERACTIVECLOSE {||.F. }
Sample
DEFINE WINDOW Form_10 ;
AT 0,0 ;
WIDTH 1200 HEIGHT 700 ;
TITLE "Web Design Experts" ;
ICON 'Logo' ;
NOSIZE TOPMOST NOMINIMIZE NOMAXIMIZE ;
MAIN ;
FONT "Arial" SIZE 10 BACKCOLOR { 211,218,236 } ;
ON INIT password_control() ;
ON INTERACTIVECLOSE {||.F. } <----------- OK !
ON KEY ESCAPE ACTION FinalProgram()
ON KEY ALT+F4 ACTION ( MsgStop( 'Alt+F4 - Not Allowed', 'Attention !!!') , NIL )
Regars
Mustafa