![]() |
#1
|
|||
|
|||
![]()
Let's say I have two forms "Form1" and "Form2".
Form1 contains two buttons, one that creates and displays Form2 and a button to close Form2. To create Form2 i use: Code:
Form2: = TForm2.Create (Self); Form2.Show; Last edited by meggyboy; 06-12-2019 at 04:47 AM. |
#2
|
|||
|
|||
![]()
Is Form2 guaranteed to exist when you close Form1? Can Form2 be closed on its own? How many instances of Form2 can be open at the same time?
The answer to these questions will determine the best solution on how to accomplish this. |
#3
|
|||
|
|||
![]()
I use the following to go to a form
with TDataForm.Create(Self) do try ShowModal; finally Release; end; To go back to the calling form I use ModalResult := mrOK; ModalResult can be different values depending on what happens in Form 2. George |
![]() |
Thread Tools | |
Display Modes | |
|
|