close

在Windows工具列上 增加非MainForm的視窗

https://stackoverflow.com/questions/5493591/how-can-i-get-taskbar-buttons-for-forms-that-arent-the-main-form

 

type
  TMyForm = class(TForm)
  ...
  protected
    procedure CreateParams(var Params: TCreateParams) ; override;
  ...

implementation

procedure TMyForm.CreateParams(var Params: TCreateParams) ;
begin
  inherited;
  Params.ExStyle := Params.ExStyle or WS_EX_APPWINDOW;
  Params.WndParent := 0;
end;

arrow
arrow
    全站熱搜

    抓狂小白 發表在 痞客邦 留言(0) 人氣()