你可以写一个自己的窗口,我这里有个例子,你可以试试
unit uMSGForm;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls, Buttons, ExtCtrls;
type
TfrmMessage = class(TForm)
lblMSGBody: TLabel;
sbHide: TSpeedButton;
imgICON: TImage;
lblTitle: TLabel;
TimerHideWindow: TTimer;
procedure FormPaint(Sender: TObject);
procedure sbHideClick(Sender: TObject);
procedure FormCreate(Sender: TObject);
procedure TimerHideWindowTimer(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
procedure CreateParams(var Params: TCreateParams); override;
end;
var
frmMessage: TfrmMessage;
implementation
{$R *.dfm}
procedure TfrmMessage.FormPaint(Sender: TObject);
var
i: word;
dx,x: real;
begin
dx := ClientWidth/256;
x := 0;
for i:=0 to 255 do
begin
Canvas.Brush.Color := $CCFFCC - (Round(i / 3) * $10001);
Canvas.FillRect(Rect(Round(x),0,Round(x+dx),ClientHeight));
x := x + dx;
end;
end;
procedure TfrmMessage.sbHideClick(Sender: TObject);
begin
Close;
end;
procedure TfrmMessage.FormCreate(Sender: TObject);
begin
Top := Screen.WorkAreaHeight - ClientHeight;
Left := Screen.WorkAreaWidth - ClientWidth;
end;
procedure TfrmMessage.CreateParams(var Params: TCreateParams);
begin
inherited CreateParams(Params);
Params.ExStyle := Params.ExStyle or WS_EX_APPWINDOW;
Params.WndParent := GetDesktopWindow;
end;
procedure TfrmMessage.TimerHideWindowTimer(Sender: TObject);
begin
frmMessage.Free;
end;
end.