[Delphi] 윈도우 알림센터에 메시지 출력하기
- 06-20
- 55,089 회
- 0 건
uses 에 System.Notification 을 추가합니다.
[code]
procedure SetNotification(Content: String);
var
NotifiCenter: TNotificationCenter;
Notification: TNotification;
begin
NotifiCenter := TNotificationCenter.Create(nil);
Notification := NotifiCenter.CreateNotification;
try
Notification.Name := Application.Title;
Notification.Title := Application.MainForm.Caption;
Notification.AlertBody := Content;
NotifiCenter.PresentNotification(Notification);
finally
Notification.Free;
NotifiCenter.Free;
end;
end;
SetNotification('알람알람!!!');
[/code]