• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 165
  • Last Modified:

Form Control

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
waipahu
Asked:
waipahu
1 Solution
 
trex_fireCommented:
use showmodal, this way control flow will be back when form1 closes.

T-Rex
0
 
kretzschmarCommented:
as trex said, except
>...back when form2 closes.

:-)

0
 
jswebyCommented:
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
 
waipahuAuthor Commented:
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
 
jswebyCommented:
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

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

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.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now