你必须用到参数才可以呀。这个样子不行的。
public
procedure Createparams(var Params: TCreateParams);override;
procedure Tfrmmain.Createparams(var Params:TCreateParams);
begin
Inherited CreateParams(Params);
With Params do
begin
EXStyle:=WS_EX_TOPMOST OR WS_EX_ACCEPTFILES ;
//ExStyle or WS_EX_TOPMOST OR WS_EX_ACCEPTFILES or WS_DLGFRAME;
wndParent:=GetDesktopWindow; //关键一行,用SetParent都不行!!
end;
end;