2

Not sure how to phrase that, but win7/win8 allows pinning to the Taskbar. When an app there is running and you hover the mouse, a window pops up showing a minature application screen.

Using winamp and an MP3 file playing, instead of showing the app form, it pops up the window with a small navigating bar to allow pausing, fast-forward etc the play.

I would like to do similar with my application, not to pause anything, but I'd like to add some working functionality to the popup window with a few buttons.

How would I go about that?

1 Answers1

4

Most of the things you describe (including the buttons on the preview window) are done using the ITaskbarList3 COM interface in Windows 7 and later.

There's a SO question about showing a progress bar in the taskbar; the two answers currently there have some relevant links, including some to examples and open-source Delphi components. Note that this may be much more difficult for you to implement with such an old version of Delphi; more recent versions have definitions and types already available for you in the RTL that simplify working with COM greatly.

As Remy points out in the comments, XE6 includes a new VCL component, TTaskbar (see note), that makes adding these buttons extremely simple. You just drop a component on the form, add the buttons using the TTaskbar.TaskbarButtons property editor, assigning a TAction and icon for each button, and you're done.

Note: The TTaskbar documentation link is void of meaningful content at this point, as the component is in the newly released XE6 (released this week). I'm adding it as a point of reference for future readers; hopefully by the time they see it, the link will have some useful details.

Community
  • 1
  • 1
Ken White
  • 123,280
  • 14
  • 225
  • 444
  • 3
    The newly released XE6 even has new wrapper components for the Win7+ Taskbar functionality. It is really not TOO hard to implement in old Delphi versions, though (I once had to do it in a C++Builder 6 project). – Remy Lebeau Apr 17 '14 at 00:15
  • @Remy: Thanks for the edit. I saw it was included in XE6, but haven't had a chance to investigate yet. I've done it myself in D2007, and include the ability to use the same app in both XP (prior to EOL, of course) and Win7, using the ITaskbarList3 interfaces if they were there. It wasn't bad, but D5 is pretty outdated. – Ken White Apr 17 '14 at 00:15