1、放置NotificationCenter1组件在form上。
2、包含了通知功能,代码如下。
uses
System.Notification;
procedure TForm1.SpeedButton1Click(Sender: TObject);
var
notification: TNotification;
begin
if Self.NotificationCenter1.Supported then
begin
notification := NotificationCenter1.createnotification;
with notification do
begin
name := '更新';
Title := '测试';
AlertBody := '只是一个测试弹出通知!';
FireDate:=Now;
NotificationCenter1.PresentNotification(notification);
end
end;
end;
3、结果。

NotificationCenter1组件通知功能实现
937

被折叠的 条评论
为什么被折叠?



