how to close the window

All you've ever wanted to know about the ActiveX, Mozilla plugins, the web interface and various PHP extensions
LOngFirE
New Cone
New Cone
Posts: 1
Joined: 21 Sep 2006 17:25

how to close the window

Postby LOngFirE » 21 Sep 2006 17:47

hello im new at this stuff..and very interresting to learn.
a im trying to make a sort of program using:
borland delphi 2005: windows forms application:

and i made a 'main menu' and a 'Exit' button at the end of the file menu.
and i was wondering..what code must i use for making it close?
and where can i read about scripting?

one more thing: how can i connect a aboutbox to the about button i made on the menu?

thx for helping me...

Themasteratdelphi
New Cone
New Cone
Posts: 6
Joined: 16 Apr 2008 06:11

Re: how to close the window

Postby Themasteratdelphi » 16 Apr 2008 06:16

the code to close a form in delphi is

[name_of_form].close;

to close an application there are two ways (1 more if using winAPI)

[name_of_main_form].close;

application.terminate;

hope this helps!

Themasteratdelphi
New Cone
New Cone
Posts: 6
Joined: 16 Apr 2008 06:11

Re: how to close the window

Postby Themasteratdelphi » 16 Apr 2008 06:21

sorry dint read it all

about boxes can be created from a normal form (click 'new form' button in delphi, it will name it form2) you can drop the components on and do what you like to it.

to call it from an about menu you call

[about_box_name].show;

i am aware that a delphi wizard can automatically make an about box from the file > new > other > forms menu.

This about box is automatically placed in the program as unit 2, you can call the about box in the same way

aboutbox.show;

hope this helps too!

ps i recommend looking at http://www.delphi.about.com this site covers everything in delphi from the basics to opengl.


Return to “Web and scripting”

Who is online

Users browsing this forum: No registered users and 6 guests