[델파이 - DELPHI] WINDOWS10 알림창
unit Unit7;
interface
uses
Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants, System.Classes, Vcl.Graphics,
Vcl.Controls, Vcl.Forms, Vcl.Dialogs, System.Notification, Vcl.StdCtrls;
type
TForm7 = class(TForm)
Button1 : TButton;
procedure Button1Click(Sender : TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form7 : TForm7;
implementation
{$R *.dfm}
procedure TForm7.Button1Click(Sender : TObject);
VAR
NotificationCenter : TNotificationCenter;
MyNotification : TNotification;
begin
NotificationCenter := TNotificationCenter.Create(nil);
MyNotification := NotificationCenter.CreateNotification;
try
MyNotification.Name := '이름';
MyNotification.Title := '제목';
MyNotification.AlertBody := '내용';
NotificationCenter.PresentNotification(MyNotification);
finally
MyNotification.DisposeOf;
NotificationCenter.DisposeOf;
end;
end;
end.