Delphi下重载窗体CreateParams翻转关闭按钮

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

posted @ 2015-11-26 21:17  findumars  Views(754)  Comments(0Edit  收藏  举报