Taskbar Sorter Utility | CodeGuru

Taskbar Sorter Utility

Environment: Win96/98/Me, NT4/Win2K, XP Introduction This utility allows you to change the order of items on your taskbar, by dragging them into position in a list. The list shows all of your visible top-level windows. To move a window, you simply drag the window’s title into the order you wish the windows to appear, and […]

Written By
CodeGuru Staff
CodeGuru Staff
Jun 21, 2002
1 minute read
CodeGuru content and product recommendations are editorially independent. We may make money when you click on links to our partners. Learn More

Environment: Win96/98/Me, NT4/Win2K, XP

Introduction

This utility allows you to change the order of items on your taskbar, by dragging them into position in a list.

The list shows all of your visible top-level windows. To move a window, you simply drag the window’s title into the order you wish the windows to appear, and click the Sort button.

To exit the utility, click on the Close button.

How It Works

The application enumerates windows that are top-level (have no owner), and do not explicitly prevent themselves from appearing in the taskbar. It adds each of the windows’ titles to a drag list box (CDragListBox), along with the icon for the app. The user then can re-order the windows. When the user clicks the Sort button, each window is hidden, by using ShowWindow(SW_HIDE), and then re-shown (ShowWindow(SW_SHOW)) in the order of the list — top to bottom. This has the effect of the window being removed from the taskbar and then being re-added at the right-hand side.

Known Limitations

Unfortunately, there doesn’t appear to be any way to interrogate the taskbar to determine, firstly which windows appear there, and secondly in what order they currently appear. This means that each time the utility is run the user needs to re-order each window from scratch.

That’s all there is to it — have fun!

Advertisement

Downloads

Download exe – 100 Kb

Download source (includes exe) – 114 Kb

CodeGuru Logo

CodeGuru covers topics related to Microsoft-related software development, mobile development, database management, and web application programming. In addition to tutorials and how-tos that teach programmers how to code in Microsoft-related languages and frameworks like C# and .Net, we also publish articles on software development tools, the latest in developer news, and advice for project managers. Cloud services such as Microsoft Azure and database options including SQL Server and MSSQL are also frequently covered.

Property of TechnologyAdvice. © 2026 TechnologyAdvice. All Rights Reserved

Advertiser Disclosure: Some of the products that appear on this site are from companies from which TechnologyAdvice receives compensation. This compensation may impact how and where products appear on this site including, for example, the order in which they appear. TechnologyAdvice does not include all companies or all types of products available in the marketplace.