Oo. i found out about form docking using page control (very neat)
i found a really good video tut on youtube, and i tried it out exactly, but i got the error
"undeclared variable: form2" or what ever, so when i call it as a variable, i keep getting the same error.
yes, i know this is off topic to the original thread, but i dont really want to make another thread =\
edit: getting the sourse now. i had to swich computers real fast
unit Unit1;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, ComCtrls, StdCtrls;
type
TForm1 = class(TForm)
Button1: TButton;
PageControl1: TPageControl;
procedure Button1Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form1: TForm1;
implementation
{$R *.dfm}
procedure TForm1.Button1Click(Sender: TObject);
begin
Tform2.create(application).show;
end;
end.
and the second "unit":
unit Unit2;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, OleCtrls, SHDocVw, StdCtrls;
type
TForm2 = class(TForm)
Button1: TButton;
procedure FormCreate(Sender: TObject);
procedure FormClose(Sender: TObject; var Action: TCloseAction);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form2: TForm2;
implementation
{$R *.dfm}
procedure TForm2.FormCreate(Sender: TObject);
begin
color := random($fffffff);
end;
procedure TForm2.FormClose(Sender: TObject; var Action: TCloseAction);
begin
action := cafree;
end;
end.