On the OnDeactivate event of the modal form, do a ModalResult := mrCancel; ?

On Apr 4, 2012, at 9:48 PM, John Barrat wrote:

> I have an application which needs to close a modal form if focus is moved to
> another application.
> 
> Effectively, I want to be able to use moving away and to another application
> to effect a cancel on the modal form.
> 
> The problem is that by the time the deactivate event has occurred the parent
> application to which the form is modal is now inactive.  Can anyone suggest
> a way around this?
> 
> 
> 
> JohnB
> 
> _______________________________________________
> Delphi mailing list
> Delphi@elists.org
> http://lists.elists.org/cgi-bin/mailman/listinfo/delphi
> 

_______________________________________________
Delphi mailing list
Delphi@elists.org
http://lists.elists.org/cgi-bin/mailman/listinfo/delphi

Reply via email to