diff options
author | graemeg <graemeg@ae50a9b5-8222-0410-bf8d-8a13f76226bf> | 2008-04-15 11:59:17 +0000 |
---|---|---|
committer | graemeg <graemeg@ae50a9b5-8222-0410-bf8d-8a13f76226bf> | 2008-04-15 11:59:17 +0000 |
commit | 61831ae8288d2da0bd5b6cd4283796b2c797b34a (patch) | |
tree | c6ddd3a0d8dcf2aa9398b380a16175b6f16d9f9d | |
parent | 4b251646770b838c9d30e7f07d0ca4e2bdb1689d (diff) | |
download | fpGUI-61831ae8288d2da0bd5b6cd4283796b2c797b34a.tar.xz |
* Minor update to the modalform demo.
-rw-r--r-- | examples/gui/modalforms/modalforms.lpr | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/examples/gui/modalforms/modalforms.lpr b/examples/gui/modalforms/modalforms.lpr index 546c4f12..188985e9 100644 --- a/examples/gui/modalforms/modalforms.lpr +++ b/examples/gui/modalforms/modalforms.lpr @@ -99,11 +99,12 @@ procedure TForm1.btnOpenForm2Click(Sender: TObject); var frm: TForm2; begin + frm := TForm2.Create(nil); try - frm := TForm2.Create(nil); frm.ShowModal; writeln('Form2: This should only appear after the form closes.'); edtTest.SetFocus; + ActivateWindow; finally frm.Free; end; @@ -143,10 +144,11 @@ procedure TMainForm.btnOpenForm1Click(Sender: TObject); var frm: TForm1; begin + frm := TForm1.Create(nil); try - frm := TForm1.Create(nil); frm.ShowModal; writeln('Form1: This should only appear after the form closes.'); + ActivateWindow; finally frm.Free; end; |