Hmmm... never got the original message; the e-mail system here must be
having difficulties.  Apologies if it's bouncing back to people from my
account.  That aside:

To answer your original question, Mark, you can achieve a modal type state
without using ShowModal, although I suspect Tony's suggestion is what you
really wanted.  But if it's not enough, and you're feeling bold, it may be
worth taking a look at the code in TCustomForm.ShowModal in the Forms unit,
as that explains exactly how ShowModal works - in short, by calling
EnableWindow(Handle, false) on all the forms in the application and a loop
of Application.HandleMessage until the modal form terminates (and not
forgetting to re-enable everything).  Doing the same thing can enable you to
selectively deactivate and activate any forms in your application how and
when you wish.

Cheers,
Carl

> -----Original Message-----
> From: Tony Goodrich [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, 21 December 1999 6:51
> To: Multiple recipients of list delphi
> Subject: RE: [DUG]: Modal stuff...
> 
> 
> Only if you call ProcessThatUpdatesForm2WithProgressInfo; from your
> modal screen.
> 
> What would be better is to make the modal screen modeless.   
> But I guess
> the point of modal screens are that they are jumping out and requiring
> to be updated before you return to Form2
> 
> hope this helps
> 
> Tony Goodrich
> 
> > -----Original Message-----
> > From:       Derricutt, Mark [SMTP:[EMAIL PROTECTED]]
> > Sent:       Tuesday, December 21, 1999 3:10 AM
> > To: Multiple recipients of list delphi
> > Subject:    [DUG]:  Modal stuff...
> > 
> > Is it possible to show a form as modal, but continue 
> execution in the
> > same
> > program block without waiting for ModalResult to be set?
> > 
> > I want to do something like:
> > 
> > procedure TForm2.DoSomething;
> > begin
> >   ShowModal;
> >   ProcessThatUpdatesForm2WithProgressInfo;
> >   ModalResult := mrOk;
> > end;
> > 
> > Normally I would just use show, but I don't want my app to accept
> > focus
> > until it's finnished, is there anyway to get a modal type state
> > without
> > using ShowModal?
> > 
> > Mark
> > 
> > -- 
> > Mark Derricutt, PB Power NZ Ltd (http://www.pbpower.net)
> > Now Playing... Lightmare - The Fool
> > 
> > 
> ----------------------------------------------------------------------
> > -----
> >     New Zealand Delphi Users group - Delphi List -
> > [EMAIL PROTECTED]
> >                   Website: http://www.delphi.org.nz
> > 
> --------------------------------------------------------------
> -------------
>     New Zealand Delphi Users group - Delphi List - 
> [EMAIL PROTECTED]
>                   Website: http://www.delphi.org.nz
> 

---------------------------------------------------------------------------
    New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
                  Website: http://www.delphi.org.nz

Reply via email to