Delphi:JEDI桌面警报(气球)的替代方案

3
有没有类似于JEDI桌面警报(一种在桌面右下角的气球状提示)的好替代品?气球提示不能像堆栈一样显示(新提示在其他提示之上),但JEDI桌面警报可以做到。也许有人知道,为什么该组件的显示事件会触发两次而不是一次呢? :) 感谢您的建议!enter image description here

你尝试过使用 TTrayIcon.BalloonHint 吗? - Warren P
@ Warren P,已编辑,请查看。 - maxfax
-1 - Rob Kennedy
1
@Rob Kennedy,我只是想要选择。这并不意味着如果一个组件很好,我就不想要其他的了。对我来说,JEDI Desktop Alert比TMS更好,但也许有人可以建议比JEDI更好的东西!我不知道世界上所有可能的组件,所以我在问 :) - maxfax
1
在StackOverflow上,明确地说出你想要做什么是一个更好的主意。“好”对你来说意味着什么?“选择”意味着什么? 在 StackOverflow 上,这些都没有意义。相反,说出你想让它有巧克力撒粉,并包裹在金色锡纸中,或者其他任何具体描述。 - Warren P
2个回答

4
这可能有点晚了,但是以下是使用Jedi桌面警报在右下角显示5个叠放的提示窗口的基本示例。 TJvDesktopAlertStack ScreenShot
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.

2
TMS Software有TAdvAlertWindow,一种"Outlook 2003、2007风格的提醒窗口"

TAdvAlertWindow

这是一个商业组件,可以单独购买或作为TMS Component Pack的一部分提供。
更新:上面的图片来自TMS网站。正如Andreas所指出的那样,字体没有反锯齿处理(它是一个位图字体,可能是MS Sans Serif)。我已经测试了该组件的试用版,并将字体设置为Tahoma,效果符合预期:

TAdvAlertWindow antialiased


1
我真诚地希望它能够与兼容ClearType的现代字体一起使用。 - Andreas Rejbrand
@Andreas:你说得对。我以前用过它,但我不记得它是否有字体抗锯齿功能,但我猜它会支持任何TrueType/OpenType字体。 - JRL
4
我认为JEDI桌面提醒比TMS更好。 - maxfax

网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接