I have Delphi 2010 VCL application that has several forms that I do not want to automatically create at the application start-up. I also have custom forms that I use as a base class so that I can more easily pass data among forms. The code I use to open the forms is below; however, the only way to get it to work is to automatically create forms at application start-up. Can anyone help me change the code below or add some other procedure to allow runtime form creating?
Thanks procedure TFrmExtractor.OpenResultsForm(frm2: TResultsForm; ResultsObj: TAnalysisReturnsO; Server1: IServer); var str1 : String; int1: integer; begin try frm2.ResultsObj := ResultsObj; frm2.IndexObj:= TIndexerO.Create(); frm2.IndexObj.IndexingServer := Server1; frm2.AnalysisObj := TAnalysisO.Create(Server1,0,0,0,0,'',''); frm2.UserObj := TUserO.Create(); SetWindowLong(frm2.Handle, GWL_EXSTYLE, GetWindowLong(frm2.Handle,GWL_EXSTYLE) or WS_EX_APPWINDOW); if frm2.ShowModal = mrOK then begin end else begin try Self.ResultsObj := frm2.ResultsObj; Self.IndexObj := frm2.IndexObj; except end; end; finally end; end;