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)
|