Solved

Close MDI Childs

Posted on 1997-11-20
3
278 Views
Last Modified: 2012-05-04
I made an MDI application, but when I close an MDI Child,
instead of close, the MDI Child is Minimized.
Can anyone tell what can I do to really close this windows.
Thanks.
Best Regards.
0
Comment
Question by:Nuno Alves
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 

Expert Comment

by:dr_gonzo
ID: 1351088
Some thing that is funny, is to free the memory of the
window class.
(But this is my method in C, and my brain is the size of a wal(l)nut)

But me(Gonzo) and my friend(Acid Smurf)'s tips is:

procedure Form1Close(Sender : TObject);
begin
   Form1.Visible := False;
end;

Then the user is stupid and believes the window is destroyed.

MTFBWU,
Dr. Gonzo & Acid Smurf & Mr Pipe

0
 
LVL 1

Author Comment

by:Nuno Alves
ID: 1351089
The user maybe stupid but delphi it isn't. When you try to
hide (visible := False) an MDI Child the following message
appears: Can't Hide an MDI Child.
Thanks for gonzo's help anyway.
0
 
LVL 3

Accepted Solution

by:
d4jaj1 earned 50 total points
ID: 1351090
This code actally closes the MDI child form.  Use in the FormClose Event.

procedure TChildForm.FormClose (Sender: TObject;
  Var Action: TCloseAction);
Begin
  Action := caFree;
end;

That's it. Call the form's Close actions as you normally would via a button or menu item and the MDI Child actually closes instead of minimizes.

Any questions, please add a coment.

Good Luck!

Jay
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction I have seen many questions in this Delphi topic area where queries in threads are needed or suggested. I know bumped into a similar need. This article will address some of the concepts when dealing with a multithreaded delphi database…
Introduction Raise your hands if you were as upset with FireMonkey as I was when I discovered that there was no TListview.  I use TListView in almost all of my applications I've written, and I was not going to compromise by resorting to TStringGrid…
Come and listen to Percona CEO Peter Zaitsev discuss what’s new in Percona open source software, including Percona Server for MySQL (https://www.percona.com/software/mysql-database/percona-server) and MongoDB (https://www.percona.com/software/mongo-…
NetCrunch network monitor is a highly extensive platform for network monitoring and alert generation. In this video you'll see a live demo of NetCrunch with most notable features explained in a walk-through manner. You'll also get to know the philos…

695 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question