Welcome, Guest
Username: Password: Remember me
Components and Libraries for Audio and Video Development, discussions, problems and suggestions
  • Page:
  • 1

TOPIC:

create TplMDIForm with code, move error 10 years 6 months ago #4621

  • zeljko
  • zeljko's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
  • Posts: 207
  • Thank you received: 38
create TplMDIForm with code, move error

procedure TForm1.Button1Click(Sender: TObject);
var
  plMDIForm1: TplMDIForm;
begin
  plMDIForm1:= TplMDIForm.Create(nil);
  plMDIForm1.Parent := plMDIFormsPanel1;
end;


mouse down error:
Project project1 raised exception class 'External: SIGSEGV'.

In file 'include/control.inc' at line 4310:
Visible := False;


mouse up:
Project project1 raised exception class 'External: SIGSEGV'.

In file 'include/control.inc' at line 3176:
if Parent <> nil then Parent.ShowControl(Self);

Please Log in or Create an account to join the conversation.

Last edit: by zeljko.

create TplMDIForm with code, move error 10 years 6 months ago #4623

  • Sternas Stefanos
  • Sternas Stefanos's Avatar
  • Offline
  • Moderator
  • Moderator
  • Ex Pilot, M.Sc, Ph.D
  • Posts: 4508
  • Thank you received: 1100
Sir, try this:
procedure TForm1.Button1Click(Sender: TObject);
var
  plMDIFormX: TplMDIForm;
begin

  plMDIFormX:= TplMDIForm.Create(plMDIFormsPanel1);
  plMDIFormX.Parent := plMDIFormsPanel1;

  plMDIFormX.Visible:=true;
end;

or
procedure TForm1.Button1Click(Sender: TObject);
var
  plMDIFormX: TplMDIForm;
begin
  plMDIFormX:= plMDIFormsPanel1.NewMDIForm('test');
  plMDIFormsPanel1.AddMDIForm(plMDIFormX);

  plMDIFormX.Visible:=true;
end;

TplMDIForm.Create, "constructor"
register to the "parent" (a TplMDIFormsPanel)
the TplMDIForm....
PilotLogic Architect and Core Programmer
The following user(s) said Thank You: zeljko

Please Log in or Create an account to join the conversation.

Last edit: by Sternas Stefanos.

create TplMDIForm with code, move error 10 years 6 months ago #4624

  • zeljko
  • zeljko's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
  • Posts: 207
  • Thank you received: 38
Thank you sternas

exampl 2 work
exampl 1 not work

Please Log in or Create an account to join the conversation.

  • Page:
  • 1