summaryrefslogtreecommitdiff
path: root/examples/gui/modalforms
diff options
context:
space:
mode:
Diffstat (limited to 'examples/gui/modalforms')
-rw-r--r--examples/gui/modalforms/modalforms.lpi2
-rw-r--r--examples/gui/modalforms/modalforms.lpr5
2 files changed, 4 insertions, 3 deletions
diff --git a/examples/gui/modalforms/modalforms.lpi b/examples/gui/modalforms/modalforms.lpi
index cc8137c8..2f25e23a 100644
--- a/examples/gui/modalforms/modalforms.lpi
+++ b/examples/gui/modalforms/modalforms.lpi
@@ -36,7 +36,6 @@
<Unit0>
<Filename Value="modalforms.lpr"/>
<IsPartOfProject Value="True"/>
- <UnitName Value="modalforms"/>
</Unit0>
</Units>
</ProjectOptions>
@@ -54,6 +53,7 @@
</SyntaxOptions>
</Parsing>
<Other>
+ <CustomOptions Value="-FUunits"/>
<CompilerPath Value="$(CompPath)"/>
</Other>
</CompilerOptions>
diff --git a/examples/gui/modalforms/modalforms.lpr b/examples/gui/modalforms/modalforms.lpr
index 99f53ab3..bac0af81 100644
--- a/examples/gui/modalforms/modalforms.lpr
+++ b/examples/gui/modalforms/modalforms.lpr
@@ -99,7 +99,7 @@ procedure TForm1.btnOpenForm2Click(Sender: TObject);
var
frm: TForm2;
begin
- frm := TForm2.Create(nil);
+ frm := TForm2.Create(Self);
try
frm.ShowModal;
writeln('Form2: This should only appear after the form closes.');
@@ -113,6 +113,7 @@ end;
constructor TForm1.Create(AOwner: TComponent);
begin
inherited Create(AOwner);
+ Visible:=False;
WindowTitle := 'Form1';
Sizeable := False;
SetPosition(150, 150, 200, 200);
@@ -144,7 +145,7 @@ procedure TMainForm.btnOpenForm1Click(Sender: TObject);
var
frm: TForm1;
begin
- frm := TForm1.Create(nil);
+ frm := TForm1.Create(Self);
try
frm.ShowModal;
writeln('Form1: This should only appear after the form closes.');