unit Unit1;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls;
type
TForm1 = class(TForm)
Button1: TButton;
procedure Button1Click(Sender: TObject);
private
{ Private declarations }
public
procedure CreateParams(var params:TCreateParams);override;
{ Public declarations }
end;
var
Form1: TForm1;
implementation
procedure TForm1.CreateParams(var params:TCreateParams);
begin
Inherited createparams(params) ; //重构方法。可以托动窗体的边框(此时窗体是无边框的)
params.style:=WS_THICKFRAME or WS_POPUP or WS_BORDER;
end;
{$R *.dfm}
procedure TForm1.Button1Click(Sender: TObject);
begin
close
end;
end.
----------供参考