Solved

Form Control

Posted on 2001-06-27
5
156 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

What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
indy tidtcpclient threading issue 8 54
Sending Gmail through Delphi 3 69
How to debug For loops? 3 34
creating threads in delphi 1 54
This article explains how to create forms/units independent of other forms/units object names in a delphi project. Have you ever created a form for user input in a Delphi project and then had the need to have that same form in a other Delphi proj…
Hello everybody This Article will show you how to validate number with TEdit control, What's the TEdit control? TEdit is a standard Windows edit control on a form, it allows to user to write, read and copy/paste single line of text. Usua…
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…
Here's a very brief overview of the methods PRTG Network Monitor (https://www.paessler.com/prtg) offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…

760 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

17 Experts available now in Live!

Get 1:1 Help Now