Watch, Follow, &
Connect with Us

Please visit our new home
community.embarcadero.com.


Welcome, Guest
Guest Settings
Help

Thread: TNotification Issue with NotificationsProject Sample.



Permlink Replies: 3 - Last Post: Apr 24, 2018 7:52 AM Last Post By: Antonio Estevez Threads: [ Previous | Next ]
Steve Gill

Posts: 9
Registered: 5/18/98
TNotification Issue with NotificationsProject Sample.
Click to report abuse...   Click to reply to this thread Reply
  Posted: Apr 23, 2018 10:18 PM
Hi,

I open and run the NotificationsProject sample with Delphi Tokyo 10.2.3 and I get this message: "This demo is designed to show Notification feature in Windows 8 or higher. Bye.".

This is on a Windows 10 Professional 64 Bit machine.

If I comment out the code then I get an Access Violation because the notification is not created in this method but instead returns nil:

function TCustomNotificationCenter.CreateNotification: TNotification;
begin
if Supported then
Result := FPlatformNotificationCenter.CreateNotification
else
Result := nil;
end;

So apparently Windows 10 isn't supported by a supposed Windows 10 component?

= Steve
Achim Kalwa

Posts: 39
Registered: 9/28/99
Re: TNotification Issue with NotificationsProject Sample.
Click to report abuse...   Click to reply to this thread Reply
  Posted: Apr 24, 2018 12:57 AM   in response to: Steve Gill in response to: Steve Gill
Am 24.04.2018 um 07:18 schrieb Steve Gill:

I open and run the NotificationsProject sample with Delphi Tokyo 10.2.3 and I get this message: "This demo is designed to show Notification feature in Windows 8 or higher. Bye.".

This is on a Windows 10 Professional 64 Bit machine.

Works fine on my system (Windows 10 Professional 64 Bit, Delphi 10.2.3).

Does this error happen when running the application from inside the IDE,
or also when running the compiled exe standalone?

Did you apply some Windows compatibility settings to the IDE?

Achim

Steve Gill

Posts: 9
Registered: 5/18/98
Re: TNotification Issue with NotificationsProject Sample.
Click to report abuse...   Click to reply to this thread Reply
  Posted: Apr 24, 2018 1:10 AM   in response to: Achim Kalwa in response to: Achim Kalwa
Achim Kalwa wrote:
Am 24.04.2018 um 07:18 schrieb Steve Gill:

Works fine on my system (Windows 10 Professional 64 Bit, Delphi 10.2.3).

Does this error happen when running the application from inside the IDE,
or also when running the compiled exe standalone?

It occurs when run in the IDE. When run standalone it starts then closes itself without displaying anything.


Did you apply some Windows compatibility settings to the IDE?

Not that I'm aware of.

= Steve
Antonio Estevez

Posts: 665
Registered: 4/12/00
Re: TNotification Issue with NotificationsProject Sample.
Click to report abuse...   Click to reply to this thread Reply
  Posted: Apr 24, 2018 7:41 AM   in response to: Steve Gill in response to: Steve Gill
El 24/04/2018 a las 07:18, Steve Gill escribió:
Hi,

I open and run the NotificationsProject sample with Delphi Tokyo 10.2.3 and I get this message: "This demo is designed to show Notification feature in Windows 8 or higher. Bye.".

This is on a Windows 10 Professional 64 Bit machine.

So apparently Windows 10 isn't supported by a supposed Windows 10 component?

The example works for me.
Maybe Windows is reporting the version to the application incorrectly.

Add a Label component to the main form.
Change the FormShow event like this:

procedure TNotificationsForm.FormShow(Sender: TObject);
begin
   OnShow := nil;
{$IFDEF MSWINDOWS}
   Label1.Caption:= TOSVersion.ToString; // Show the Windows version
 
   if not TOSVersion.Check(6, 2) then // Windows 8
   begin
     ShowMessage('This demo is designed to show Notification feature in Windows 8 or higher. Bye.');
     //Application.Terminate; // Comment out this line
   end;
{$ENDIF MSWINDOWS}
end;
Legend
Helpful Answer (5 pts)
Correct Answer (10 pts)

Server Response from: ETNAJIVE02