Re: [Lazarus] Flashing task bat icon orange on Windows 7
On Fri, Jun 12, 2015 at 4:25 PM, Richard Mace wrote: > Hi, > I am trying to work out how to flash the taskbar icon in Windows 7, like > Skype does, pragmatically. I have googled, and the closest I found was > FlashWindowEx, but that doesn't actually flash the icon, just the form > window. > If your app is not the foreground app, SetForegroundWindow will flash the taskbar icon. On a new project, drop a TTimer, paste this, run, and minimize your app. procedure TForm1.Timer1Timer(Sender: TObject); begin SetForegroundWindow(Form1.Handle); end; see msdn: https://msdn.microsoft.com/en-us/library/windows/desktop/ms633539(v=vs.85).aspx "An application cannot force a window to the foreground while the user is working with another window. Instead, Windows flashes the taskbar button of the window to notify the user." -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Flashing task bat icon orange on Windows 7
You'll need the taskbar's handle which you can get from WidgetSet.AppHandle. uses JwaWindows, InterfaceBase; procedure TForm1.Button1Click(Sender: TObject); var i: FLASH_INFO; begin i.cbSize := sizeof(i); i.hwnd := WidgetSet.AppHandle; i.dwFlags := FLASHW_TRAY or FLASHW_TIMERNOFG; i.uCount := 0; i.dwTimeout := 0; FlashWindowEx(i); end; Am 12.06.2015 um 22:25 schrieb Richard Mace: > Hi, > I am trying to work out how to flash the taskbar icon in Windows 7, > like Skype does, pragmatically. I have googled, and the closest I > found was FlashWindowEx, but that doesn't actually flash the icon, > just the form window. > > Any ideas? > > Thanks > > Richard > > > -- > ___ > Lazarus mailing list > Lazarus@lists.lazarus.freepascal.org > http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Flashing task bat icon orange on Windows 7
Richard please send a screen shot for better understanding. Regards, Ara -- http://www.fastmail.com - Send your email first class -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
Re: [Lazarus] Flashing task bat icon orange on Windows 7
I have no clue how they do this - but would suspect that they might cycle through a number of images based on a timer Date: Fri, 12 Jun 2015 21:25:02 +0100 From: richard.m...@gmail.com To: lazarus@lists.lazarus.freepascal.org Subject: [Lazarus] Flashing task bat icon orange on Windows 7 Hi,I am trying to work out how to flash the taskbar icon in Windows 7, like Skype does, pragmatically. I have googled, and the closest I found was FlashWindowEx, but that doesn't actually flash the icon, just the form window. Any ideas? Thanks Richard -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
[Lazarus] Flashing task bat icon orange on Windows 7
Hi, I am trying to work out how to flash the taskbar icon in Windows 7, like Skype does, pragmatically. I have googled, and the closest I found was FlashWindowEx, but that doesn't actually flash the icon, just the form window. Any ideas? Thanks Richard -- ___ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus