Hola,
No es nada en especial
Troy, me refería a que bien pudiera coger un libro...
Código Delphi
[-]
unit UMsgPopup; interface
uses Forms,StdCtrls,
Windows,Classes,Graphics;
procedure MsgPopup(const msg:
string; const wait: integer);
implementation
procedure MsgPopup(const msg:
string; const wait: integer);
var
i,max: integer;
lbMsg:TLabel;
fmMsg:TForm;
panel:TRect;
begin
fmMsg := TForm.Create(nil);
try
with fmMsg do
begin
Width := 350;
Height := 110;
Color := clWhite;
Caption:=' '+msg;
SystemParametersInfo
(48, 0, @panel, 0);
Top := panel.Bottom;
BorderStyle := bsToolWindow;
FormStyle:= fsStayOnTop;
lbMsg:=TLabel.Create(fmMsg);
Left := panel.Right-fmMsg.Width-2;
max :=panel.Bottom-fmMsg.Height-2;
with lbMsg do
begin
Top:= 30;
Left := 10;
Height:=30;
Parent:= fmMsg;
AutoSize :=false;
Caption:= msg;
Font.Size :=14;
Font.Name := 'Arial';
Font.Color:= clRed;
Alignment:= taCenter;
Font.Style:=[fsBold];
Width := fmMsg.Width;
end ;
Show;
i := Top;
while(i>=max)do
begin
Top := i;
Dec(i,2);
Refresh ;
end;
end;
finally
Sleep(wait);
fmMsg.Free;;
end;
end;
end.