Board index » delphi » Close All Modal Forms except menu
David Carle
![]() Delphi Developer |
Wed, 26 Jul 2000 03:00:00 GMT
|
David Carle
![]() Delphi Developer |
Wed, 26 Jul 2000 03:00:00 GMT
Close All Modal Forms except menuD2.0 CS, W95 |
Pierre Gem
![]() Delphi Developer |
Fri, 28 Jul 2000 03:00:00 GMT
Re:Close All Modal Forms except menuQuoteOn Sat, 07 Feb 1998 17:30:50 -0800, David Carle <d...@clara.net> wrote: You could do this in various ways, let me suggest the following: Create a general purpose unit (not associated with any form) : Now you set and test this as follows : {Top unit in the chain of modal forms. Pierre Gemis |
atjense
![]() Delphi Developer |
Tue, 01 Aug 2000 03:00:00 GMT
Re:Close All Modal Forms except menu
David Let me suggest another way. One that uses inheritence instead of a global Create a base form that has a property which when set to true first checks i.e. procedure TfrmBaseCloser.setCloseAll( doit : Boolean ); Now derive all your actual working forms from this base form, all that is i.e. type In your program you instantiate the working forms using the 'self' property ie procedure TfrmModal.btnNewClick(Sender: TObject); Now you can either close one of these forms with the standard 'close' or ie. procedure TfrmModal.btnCloseMeClick(Sender: TObject); procedure TfrmModal.btnCloseAllClick(Sender: TObject); I have attached a little project that demostrates this in action. You HTH Andy Jensen Pierre Gemis <sof...@redestb.es> wrote in article Quote> On Sat, 07 Feb 1998 17:30:50 -0800, David Carle <d...@clara.net> wrote:
|
Pierre Gem
![]() Delphi Developer |
Wed, 02 Aug 2000 03:00:00 GMT
Re:Close All Modal Forms except menuOn 13 Feb 1998 02:22:14 GMT, "atjensen" <atjen...@bellatlantic.net> Quote>This is a multi-part message in MIME format. Pierre Gemis |
1. Closing a modal or non-modal Form
2. closing all forms in a project except main-form
3. On Closing one Modal dialog all other Modal dialogs getting close
4. Closing one Modal dialog closing all other Modal dialogs
5. Showing a Modal Form from a Modal Form
6. MDI child, notification of parent's form main menu , when child form is closing
7. Closing a Modal Form in FormActivate