I am testing for it to be not equal to none - i.e. any value apart from 0. I think as others have said it is due to calling it in the activate event.
JohnB -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Ralph D. Wilson II Sent: 03 September 2007 03:24 To: Borland's Delphi Discussion List Subject: Re: Closing modal forms What you are doing wrong is setting the form to mrOK but testing for mrNone in order to close the form. At 11:31 AM 9/2/2007, you wrote: >procedure TfmCleanUpMain.btnOKClick(Sender: TObject); begin > if fmprogress.showmodal <> mrNone then > close; >end; Ralph D. Wilson II Systems Analyst Home: (210) 497-2643 Cell: (210) 387-7744 Fax: (210) 497-5726 [EMAIL PROTECTED] [EMAIL PROTECTED] _______________________________________________ Delphi mailing list -> [email protected] http://www.elists.org/mailman/listinfo/delphi _______________________________________________ Delphi mailing list -> [email protected] http://www.elists.org/mailman/listinfo/delphi

