Einzelnen Beitrag anzeigen

Ghostwalker

Registriert seit: 16. Jun 2003
Ort: Schönwald
1.299 Beiträge
 
Delphi 10.3 Rio
 
#1

NotificationCenter und deren Funktion

  Alt 16. Mai 2017, 06:03
Hi,

ich experimentiere grad ein wenig mit dem TNotificationCenter rum und stosse dabei auf folgende Probleme:

Basiscode sieht so aus (direkt aus der Demo geholt):

Delphi-Quellcode:
var
  MyNotification: TNotification;
begin
  MyNotification := NotificationCenter1.CreateNotification;
  try
    MyNotification.Name := 'Windows Notification';
    MyNotification.Title := 'My first Notification';
    MyNotification.AlertBody := 'Notification send by my application.';
    MyNotification.FireDate := Now()+EncodeTime(0,0,10,0);
    NotificationCenter1.PresentNotification(MyNotification);
  finally
    MyNotification.Free;
  end;
end;
Soweit funktionierts auch, die Nachricht wird sofort angezeigt.

mach ich nun aus

Delphi-Quellcode:
    
NotificationCenter1.PresentNotification(MyNotification);
    NotificationCenter1.ScheduleNotification(MyNotification); wars das. Die Nachricht wird nicht angezeigt (nach 10 Sekunden sollte sie das eigentlich).

Auch einen eigenen Sound bekomme ich nicht ans laufen, obwohl ich mich hier
an diese Tut gehalten hab: http://docwiki.embarcadero.com/RADSt...fication_Sound

Weder mit mp3 noch mit wav, egal was ich für einen Pfad angebe.....

Hat jemand hier evtl. den ein oder anderen Tip ?
Uwe
e=mc² or energy = milk * coffee²
  Mit Zitat antworten Zitat