Login | Register   
LinkedIn
Google+
Twitter
RSS Feed
Download our iPhone app
TODAY'S HEADLINES  |   ARTICLE ARCHIVE  |   FORUMS  |   TIP BANK
Browse DevX
Sign up for e-mail newsletters from DevX


Tip of the Day
Language: Pascal
Expertise: Beginner
May 8, 1997

Closing MDI children in an MDI application

Question:
I have made an MDI application with many MDI children, but when I try to close an MDI child it becomes minimized. How can I avoid this and close the window?

Answer:
To completely close an MDI child form, do the following:

  1. Display your child form in the IDE, making sure you're selecting the form itself, not one of its components (hint: look at the Object Inspector to see if the currently displayed component is actually the form itself).

  2. Click on the Events tabs of the Object Inspector.

  3. Double-click on the OnClose event to open a handler for it.

  4. Type the following in the begin and end block:
 Action := caFree;
Save your file, compile your project and run. Now, when you close the form, it will truly close.
DevX Pro
 
Comment and Contribute

 

 

 

 

 


(Maximum characters: 1200). You have 1200 characters left.

 

 

Sitemap
Thanks for your registration, follow us on our social networks to keep up-to-date