윈도우 알림센터에 메시지 출력하기

uses 에 System.Notification 을 추가합니다.

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('알람알람!!!');

评论

精华帖

Delphi Delphi IDE 메인 폼 안열림 dproj 설정으로 해결
Delphi TDirectory.Delete 대신 CMD 으로 폴더 삭제
Delphi 폼이 모니터 한 가운데 있는 경우 자연스럽게 왼쪽으로 …
Delphi TrayIcon 이 흐릿하게 보이는 버그? 수정
Delphi 실행 중인 프로세스가 활성 창인지 확인하는 함수
Delphi 메세지 다이어그램(Message Dialog) 에 체크박스(CheckB…
浏览 Delphi 윈도우 알림센터에 메시지 출력하기
Delphi 중복 실행 방지
Delphi 파일 포맷 알아내기
Delphi 권한상승
Delphi Glyph 에 사용할 이미지 생성하기
Delphi bsNone 인 폼에서 드래그 및 크기조절