type
TForm1 = class(TForm)
private
{ Private declarations }
public
{ Public declarations }
procedure CreateParams(var Params: TCreateParams); override;
end;
var
Form1: TForm1;
implementation
{$R *.dfm}
{ TForm1 }
procedure TForm1.CreateParams(var Params: TCreateParams);
var
WndParent: HWND; //保存桌面句柄
begin
inherited CreateParams(Params);
with Params do
begin
EXStyle := EXStyle or WS_EX_TOPMOST or WS_EX_ACCEPTFILES or WS_DLGFRAME;
WndParent := GetDesktopWindow;
end;
end;
http://www.lsworks.net/article/3.html
时间: 2024-10-25 11:52:45