>Say I want to create the new panel in my current code, but not on the same form...
>Q is; how to create and free such a beast so that it is independent of the
>current mainform. It needs to be a 640x480 panel which I will actually
>locate off the screen.
>Does it have to me made showmodal??
The code below makes a form and a panel and shows the form offscreen giving a handle
to the panel (called ThePanel) so that you can alter its behaviour assign events and
such...
Creation and destruction are performed at entry and exit of the application... I dunno
if this
is what you want or not... Note that it isn't showmodal so it should be fine... There
might
be more management of the offscreen form though...
unit Unit1;
interface
uses
ExtCTrls,Forms;
var
ThePanel :TPanel;
implementation
var
HolderForm :TForm;
initialization
HolderForm := TForm.Create(nil);
with HolderForm do begin
Left := -1000;
Top := -1000;
Show;
end;
ThePanel := TPanel.Create(HolderForm);
with ThePanel do begin
Parent := HolderForm;
Width := 640;
Height := 480;
end;
finalization
HolderForm.Free;
end.
--
Aaron Scott-Boddendijk
Jump Productions
(07) 838-3371 Voice
(07) 838-3372 Fax
---------------------------------------------------------------------------
New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
Website: http://www.delphi.org.nz