Forum > General

Form close, open

(1/1)

exdatis:
  Hi all,
after 10th-12th form close-open, error msg: access violation.
onFormClose...
   CloseAction:= caFree;
   CurrentForm:= nil;
same error if:
onFormClose...
    CurrentForm.Free or FreeOnRelease.
on new form:
   CurrentForm:= TCurrentForm.Create(self);
   CurrentForm.Parent:= SomePanel;
   CurrentForm.Left:= 0;
   CurrentForm.Top:= 0;
   CurrentForm.Show;
Before new form:
  if SomePanel.ControlCount>2 then {logo and 'powered by lazarus' picture are Control[0], Control[1]}
    SomePanel .Controls[2].Destroy;
   Thanks.  %)

zeljko:
procedure TMyForm.FormClose(Sender......);
begin
  CloseAction := caFree;
end;

exdatis:
 ????
procedure TCurrentForm.FormClose(Sender: TObject; var CloseAction: TCloseAction
  );

Tobject, ????

Navigation

[0] Message Index

Go to full version