?
Solved

Close MDI Childs

Posted on 1997-11-20
3
Medium Priority
?
279 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 200 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

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

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

This article explains how to create forms/units independent of other forms/units object names in a delphi project. Have you ever created a form for user input in a Delphi project and then had the need to have that same form in a other Delphi proj…
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…
This is my first video review of Microsoft Bookings, I will be doing a part two with a bit more information, but wanted to get this out to you folks.
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…
Suggested Courses
Course of the Month14 days, 4 hours left to enroll

801 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