Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Close MDI Childs

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

New feature and membership benefit!

New feature! Upgrade and increase expert visibility of your issues with Priority Questions.

Question has a verified solution.

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

A lot of questions regard threads in Delphi.   One of the more specific questions is how to show progress of the thread.   Updating a progressbar from inside a thread is a mistake. A solution to this would be to send a synchronized message to the…
Hello everybody This Article will show you how to validate number with TEdit control, What's the TEdit control? TEdit is a standard Windows edit control on a form, it allows to user to write, read and copy/paste single line of text. Usua…
Is your data getting by on basic protection measures? In today’s climate of debilitating malware and ransomware—like WannaCry—that may not be enough. You need to establish more than basics, like a recovery plan that protects both data and endpoints.…
This lesson discusses how to use a Mainform + Subforms in Microsoft Access to find and enter data for payments on orders. The sample data comes from a custom shop that builds and sells movable storage structures that are delivered to your property. …
Suggested Courses

597 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