Solved

Use of more forms.

Posted on 1997-10-01
3
136 Views
Last Modified: 2010-04-04
IMPORTANT: I am a beginner, but I couldn't find the answer in my Delphi-books to my next question: I want to use more forms in ONE application. All the time I want the possibility to use more than one form, and not just at the start of the program. Which steps do I have to follow when I want to make an application with two forms and how do I have to save the whole project? And when I re-open the project, the second form I created is never visible, why?
Thanks for the answer! RoosieDB, The Netherlands.
0
Comment
Question by:RoosieDB
3 Comments
 
LVL 2

Expert Comment

by:Waldek
ID: 1346689
Do You will display two forms at start Your program ?
0
 

Author Comment

by:RoosieDB
ID: 1346690
Edited text of question
0
 

Accepted Solution

by:
crexes earned 50 total points
ID: 1346691
Hi...
When you want to add a Form to your application you can select:
"New Form" - button
OR
File/New Form - menu

Then you will get one new form (ex. Form2) AND a new unit (ex. Unit2). Every Form has got ONE unit wich contains the code to the specific Form.
If you want to call procedures or functions from Form2 when your Form1 is displaying (ex. you want to show Form2 and call the procedure Form2.Show) you MUST declarate your (in this case) Unit2 in your Unit1 under the "implementation" - topic in Unit1.
Ex:
---------
implementation
uses Unit2
---------
That explains to the compilator that it should look in Unit2 for the Form2.Show - procedure.

File/Save Project - meny saves the project... When you open your project only ONE form comes up - BUT the other one (this case Form2) is also integrated in the project. If you want to show this at design time you can pick it from the "Select form from list" - button.

Hope this helps...

//Crexes
Thomas


0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

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…
Introduction Raise your hands if you were as upset with FireMonkey as I was when I discovered that there was no TListview.  I use TListView in almost all of my applications I've written, and I was not going to compromise by resorting to TStringGrid…
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

839 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