1. Home
  2. Computing & Technology
  3. Delphi Programming

How to Animate (Scroll) Application Title on the TaskBar

By , About.com Guide

Animating TaskBar Button Title

If you need to grab a user attention when something important is about to happen in your application, you can flash a window.

If a lengthy process is about to start in you application, you can indicate that the process is still running by, for example, animating the title of your application, i.e. animating the caption of your application's TaskBar button.

Animated / Scrolling / Marquee TaskBar Title!

Here's how to create a scrolling Title for the TaskBar button
  1. Drop a TTimer component on the main form of your application.
  2. Handle the OnTimer event as:
    const
      {$J+}
      animatedTitle : string = ' Animated Application''s TaskBar Title ';
      {$J-}
    var
      cnt: Integer;
    begin
      Application.Title := animatedTitle;
      for cnt := 1 to (Length(animatedTitle) - 1) do
        animatedTitle[cnt] := Application.Title[cnt + 1];
      animatedTitle[Length(animatedTitle)] := Application.Title[1];
    end;

    The animatedTitle is a typed constant!

  3. Enable or disable the animation by setting the Enabled property of the Timer component to true or false.
  4. Watch the title of the application scrolling on the TaskBar's button!
Note: Here's how to create a marquee/scrolling label.

Delphi tips navigator:
» How to Draw a Gradient Fill on a Canvas
« Create a Resizable Form with No Border

More Delphi Programming Quick Tips
Explore Delphi Programming
About.com Special Features

Holiday Central

What to eat, where to go, fun things to do and how to save money on the perfect gifts. More >

Family Tech Center

Stay connected and entertained with reviews on tips on the latest HDTVs, cellphones and more. More >

  1. Home
  2. Computing & Technology
  3. Delphi Programming
  4. Coding Delphi Applications
  5. Delphi Tips and Tricks
  6. Delphi 2006 Tips
  7. How to Animate (Scroll) Delphi Application Title on the TaskBar

©2009 About.com, a part of The New York Times Company.

All rights reserved.