TIP: Click on subject to list as thread! ANSI
echo: delphi
to: ALL
from: BART BROERSMA
date: 1997-03-22 12:07:00
subject: Simple question

Hallo everyone out there,
I'm fairly new to Delphi, although I've had some years experience in TP 
6.0.
Here's something I don't quite understand.
Say I have a simple apllication (Delphi 1.0), with Form1 as the main form.
Now I add another form (Form2) to this project, lets say something like an 
AboutBox or a simple Ok/Cancel dialog.
Now, what is the proper way to show this form, which syntax is correct ?
1.
  ...
  Form2.SomeProperty := SomeValue;
  Form2.ShowModal;
  if Form2.ModalResult = mrOk then ...
  ...
or
2.
  ...
  Form2 := TForm2.Create(Application);
  Form2.SomeProperty := SomeValue;
  Form2.ShowModal;
  if Form2.ModalResult = mrOk then ... 
  ...
  Form2.Free;
Both syntaxes seem to work, so I'm a little confused here (am I missing 
some fundamental concept here ?). I bought Delphi on some kind of special 
offer and it came without the manuals...
Can somebody please explain this to me ?
Thanks in advance,
Bart
--------------------------------------
Bart Broersma
broersma@knmg.nl
 * Wave Rider 1.20 [NR] *
... UNREGISTERED EVALUATION COPY
--- Wave Rider v1.20
---------------
* Origin: Aargh! BBS Amsterdam (2:280/606)

SOURCE: echomail via exec-pc

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.