Solved

Form Control

Posted on 2001-06-27
5
157 Views
Last Modified: 2010-04-06
How do you control the flow a program when calling
another form to be displayed?

Example: i am at form1, making a call to display form2
which will get some user input and return to form1.

form1
--------------------------------
form2.Show;
showmessage('back from form2');

The text "back from form2" displays before I get
to form2.  How do I pass control to form2 and then
exit and return the the statment following
the statement "form2.show"?

Your help is much needed.
Thanks


0
Comment
Question by:waipahu
5 Comments
 
LVL 1

Accepted Solution

by:
trex_fire earned 100 total points
ID: 6233557
use showmodal, this way control flow will be back when form1 closes.

T-Rex
0
 
LVL 27

Expert Comment

by:kretzschmar
ID: 6234052
as trex said, except
>...back when form2 closes.

:-)

0
 
LVL 4

Expert Comment

by:jsweby
ID: 6234114
To add to this, using ShowModal also returns a result depending on how Form2 was closed which you can use to determine if the user pressed OK or Cancel, for example.

J.
0
 

Author Comment

by:waipahu
ID: 6234497
Thank you T-REX!  It works!
Hey what do you guys do for a living? Delphi Programmers?
Where are you all from?
Any idea how Delphi 6 is?

Thanks again
Aloha from Hawaii!
0
 
LVL 4

Expert Comment

by:jsweby
ID: 6234512
I'm a Delphi developer, yes, from the UK. Saw Delphi 6 at the last Delphi Conference, looks great, especially the Enterprise edition with the XML support. They've speeded up the code insight as well which runs horribly slow in Delphi 5.

J.
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
loading dll from external path 1 213
Delphi component that can load a DLL in design time? 8 53
Working this component WebCopy with proxy, help 3 76
Multiple image collision 13 69
Introduction I have seen many questions in this Delphi topic area where queries in threads are needed or suggested. I know bumped into a similar need. This article will address some of the concepts when dealing with a multithreaded delphi database…
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…
This Micro Tutorial will give you a basic overview how to record your screen with Microsoft Expression Encoder. This program is still free and open for the public to download. This will be demonstrated using Microsoft Expression Encoder 4.
In this video I am going to show you how to back up and restore Office 365 mailboxes using CodeTwo Backup for Office 365. Learn more about the tool used in this video here: http://www.codetwo.com/backup-for-office-365/ (http://www.codetwo.com/ba…

863 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

Need Help in Real-Time?

Connect with top rated Experts

23 Experts available now in Live!

Get 1:1 Help Now