开发者

Delphi: Alternative to JEDI Desktop Alert (balloon)

Is there a good analogue/equivalent to JEDI Desktop Alert (a kind of a balloon in the right bottom corner of a deskt开发者_开发百科op)?

Balloon hint cannot be showed like a stack (a new hint is on the top of others), but JEDI Desktop Alert can do it.

May be some one knows, why does a show event of that component fire twice instead of once? :)

Delphi: Alternative to JEDI Desktop Alert (balloon)

Thank your for suggestions!


This might be a bit late, but below is a basic example of showing 5 stacked alert windows on top of each other in bottom right corner, using Jedi Desktop Alert.

Delphi: Alternative to JEDI Desktop Alert (balloon)

unit Unit1;


interface


uses
  Winapi.Windows,
  Winapi.Messages,
  System.SysUtils,
  System.Variants,
  System.Classes,
  Vcl.Graphics,
  Vcl.Controls,
  Vcl.Forms,
  Vcl.Dialogs,
  Vcl.StdCtrls,
  JvDesktopAlert;

type
  TForm1 = class(TForm)
    Button1: TButton;
    procedure Button1Click(Sender: TObject);
  private
    { Private declarations }
    procedure AddAlert(title, text: String; stack: TjvDesktopAlertStack);
  public
    { Public declarations }
  end;

var
  Form1: TForm1;


implementation

{$R *.dfm}  

procedure TForm1.AddAlert(title, text: String; stack: TjvDesktopAlertStack);
Begin
  with TJvDesktopAlert.Create(self) do
  Begin
    AutoFree   := true;
    AlertStack := stack;
    HeaderText := title;
    MessageText := text;
    Execute(self.Handle);
  End;
End;

procedure TForm1.Button1Click(Sender: TObject);
var
  stack: TjvDesktopAlertStack;
begin
  stack := TJvDesktopAlertStack.Create(self);
  try
    AddAlert('title1', 'message1', stack);
    AddAlert('title2', 'message2', stack);
    AddAlert('title3', 'message3', stack);
    AddAlert('title4', 'message4', stack);
    AddAlert('title5', 'message5', stack);
  finally
    stack.Free;
  end;
end;

end.


TMS Software has TAdvAlertWindow, an "Outlook 2003, 2007 style alert window".

Delphi: Alternative to JEDI Desktop Alert (balloon)

It's a commercial component, available separately or as part of the TMS Component Pack.

Update: The above image was taken from TMS website. As Andreas has pointed the font is not antialiased (it's a bitmapped font, probably MS Sans Serif). I've tested the trial version of the component and setting the font to Tahoma works as expected:

Delphi: Alternative to JEDI Desktop Alert (balloon)

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜