1. Home
  2. Computing & Technology
  3. Delphi Programming
photo of Zarko Gajic
Zarko's Delphi Programming Blog

By Zarko Gajic, About.com Guide to Delphi Programming since 1998

No Main Form Delphi Application

Monday April 7, 2008
in Delphi TIPS :: Every Delphi application must have a main form. The main form is the first form created in the body of the application. When the main form closes, the application terminates.

What if you need to create an application where every form is equally important (for example like IE) - where closing the main form will *not* close the application?

Read the full article to learn How to Avoid Having a Main Form in a Delphi Application

Related:

Comments
April 9, 2008 at 1:07 am
(1) Pierre-Emile Burlot says:

If you want to automatically close your hidden main form, do not forget the form destruction in TAppForm.FormClose. Without the caFree, FormCount do not decrement and your application never terminate.
Fix it like that :
procedure TAppForm.FormClose(Sender: TObject; var Action: TCloseAction);
begin
//TRUE MAIN and this fake instance
Action := caFree; //

Leave a Comment

Line and paragraph breaks are automatic. Some HTML allowed: <a href="" title="">, <b>, <i>, <strike>

Explore Delphi Programming
About.com Special Features

Stay connected and entertained with reviews on tips on the latest HDTVs, cellphones and more. More >

Easy ways to connect two computers for networking purposes. More >

  1. Home
  2. Computing & Technology
  3. Delphi Programming

©2009 About.com, a part of The New York Times Company.

All rights reserved.