If you choose to create a form at startup, and do not want it displayed until sometime later during program execution, the form's event handler uses the ShowModal method to display the form that is already loaded in memory:
procedure TMainForm.Button1Click(Sender: TObject); begin ResultsForm.ShowModal; end;
void __fastcall TMainMForm::FirstButtonClick(TObject *Sender) { ResultsForm->ShowModal(); }
In this case, since the form is already in memory, there is no need to create another instance or destroy that instance.
Copyright(C) 2009 Embarcadero Technologies, Inc. All Rights Reserved.
|
What do you think about this topic? Send feedback!
|