unit Unit2;
interface
uses
Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs;
type
TForm2 = class(TForm)
private
{ Private declarations }
public
{ Public declarations }
procedure CreateParams(var Params:TCreateParams);override;
end;
var
Form2: TForm2;
implementation
{$R *.DFM}
{ TForm2 }
procedure TForm2.CreateParams(var Params: TCreateParams);
begin
inherited CreateParams(Params);
Params.WndParent:=getdesktopwindow;//***
end;
end.
在form1里用form2.show;显示它