I'm having trouble creating form
in Delphi, I'm using a procedure but it's giving a direct error.
Can anyone tell me a more efficient way to create a form
in Delphi?
Current code:
procedure TLogin.CriarForm(NomeForm: TFormClass);
begin
//Procedimento para criar formulario na memória
with NomeForm do begin
Try begin
TForm(NomeForm):=NomeForm.Create(Application);
TForm(NomeForm).Showmodal;
end;
Finally
FreeAndNil(NomeForm);
End;
end;
end;