Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Windows 7 Taskbar API: How to add entries for a taskbar button for multiple windows

Posted on 2013-05-21
2
Medium Priority
?
480 Views
Last Modified: 2013-05-21
When I run my Delphi application, Windows 7 shows a taskbar button in the Windows taskbar. When the user opens a new form in my application, I want that the taskbar button for my application is visually changed and when the user clicks on it a popup appears with a list of the windows (see picture).

Windows taskbar button

So basically the standard Windows behaviour like in Outlook when you have multiple emails open at the same time.

I searched the web and found a few "solutions", but they don't work for me. Maybe I overlook something really easy but I cannot find it. I attached my sample that does not work and I would like somebody to fix it.

When you run the program, click on the button to open a new window. Now the taskbar button should have changed to indicate that there is a new window for this app but it doesn't do that.

I would be pleased if someone can change the program so that it works.

Regards,
Dirk.
Test2.zip
0
Comment
Question by:dirkil2
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 28

Accepted Solution

by:
Sinisa Vuk earned 2000 total points
ID: 39185460
Remove all code except that from Button click event. Add these lines:
...
private
  procedure CreateParams(var Params: TCreateParams); override;
...

procedure TForm1.CreateParams(var Params: TCreateParams);
begin
  inherited;
  //set form ext. params
  Params.ExStyle := Params.ExStyle or WS_EX_APPWINDOW;
  //set parent for your form
  Params.WndParent := GetDesktopWindow;
end;

Open in new window


... similar is here... http://www.swissdelphicenter.ch/torry/showcode.php?id=775
0
 

Author Closing Comment

by:dirkil2
ID: 39185701
Absolutely perfect!! Thank you very much for your help which made my day!
0

Featured Post

[Webinar] Lessons on Recovering from Petya

Skyport is working hard to help customers recover from recent attacks, like the Petya worm. This work has brought to light some important lessons. New malware attacks like this can take down your entire environment. Learn from others mistakes on how to prevent Petya like worms.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

First some basics on Windows 7 Backup.  It has 2 components one is a file based backup which is stored in .zip files each zip is split at around 200 Megabytes and there is the Image Backup which is as the name implies a total image of the partition …
IF you are either unfamiliar with rootkits, or want to know more about them, read on ....
This Micro Tutorial will teach you the basics of configuring your computer to improve its speed. It will also teach you how to disable programs that are running in the background simultaneously. This will be demonstrated using Windows 7 operating…
This Micro Tutorial will give you a basic overview of Windows Live Photo Gallery and show you various editing filters and touches to photos you can apply. This will be demonstrated using Windows Live Photo Gallery on Windows 7 operating system.
Suggested Courses

610 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question