Put Application Icon on Dock to bouncing lazarus / 33-macOS - Mac OS X ---------------------------------------------------------------------- Odacir · 2013-01-31 19:51 I'm trying put my application icon to bounce, to notify user about a atention to my application (notification about update on some thing). Have any way to made this using Lazarus? My target OS is OS X 10.7. Thanks any help. ---------------------------------------------------------------------- Shebuka · 2013-07-10 10:40 add this to your uses Code: [Select]{$IFDEF DARWIN}MacOSAll, appkit,{$ENDIF} on form creation put this: Code: [Select]    {$IFDEF LCLCarbon}     NsApp := NSApplication.sharedApplication;     {$ENDIF} when you need to make the icon bounce use this for bounce the icon once Code: [Select]      {$IFDEF LCLCarbon}       FRequestUserAttentionID := NSApp.requestUserAttention(NSInformationalRequest);       {$ENDIF}or this to bounce icon untill application is activated Code: [Select]      {$IFDEF LCLCarbon}       FRequestUserAttentionID := NSApp.requestUserAttention(NSCriticalRequest);       {$ENDIF}if you need you can use the FRequestUserAttentionID identifier (it's an integer) to deactivate the bouncing Code: [Select]      {$IFDEF LCLCarbon}       NSApp.cancelUserAttentionRequest(FRequestUserAttentionID);       {$ENDIF} p.s you can't bounce icon if your application is active (it has 'focus') p.p.s. i'm using $IFDEF to be prepared to compile this code also on other platforms. ---------------------------------------------------------------------- Hansaplast · 2019-04-23 10:48 I realize this is an old post, but it's been a super helpful one to me. Since there have been a few changes in the past 6 years; You'll need to switch mode: Code: [Select]{$modeswitch ObjectiveC1} Units: Code: [Select]{$IFDEF DARWIN} ,MacOSAll, CocoaAll {$ENDIF} And of course swap Code: [Select]{$IFDEF LCLCarbon}with Code: [Select]{$IFDEF DARWIN} The rest works still today.