Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1023
  • Last Modified:

How do I make my applications taskbar button flash

Hi there,

I have a situation where my application is often running in the background, minimized, with only the applications taskbar button showing. Some times I have to alert the user to something, and would like to make the application button flash the same way I've seen many other applications do it. I've tried with showmessage, messagedlg  and even raising an exception, but no luck. Is there a specific command that will do this ?

best regards
NetGeek
0
NetGeek
Asked:
NetGeek
  • 3
  • 2
1 Solution
 
BobcsiCommented:
Use it:

FlashWindow(application.Handle, true);

Bobcsi
0
 
NetGeekAuthor Commented:
very good, and very fast :)
0
 
BobcsiCommented:
Thx:)
0
 
NetGeekAuthor Commented:
Just a quick follow-up ;)

I now start a timer which use flashwindow(application.handle,true). In the application.onactivate event i stop my timer. But depending on when the user activates my application, the taskbar button might stay colored until it has lost focus, got focus again and lost focus again. Is there a way to change that ?
0
 
BobcsiCommented:
if your app get focus, run it: flashwindow(application.handle,false).

Bobcsi
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

  • 3
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now