5,442,164 members and growing! (19,395 online)
Email Password   helpLost your password?
Web Development » Applications & Tools » Tools with source code     Intermediate License: The Code Project Open License (CPOL)

Taskbar Sorter Utility

By Paul S. Vickery

Utility to change order of icons in taskbar
VC6, VC7, C++Windows, NT4, Win2K, WinXP, MFC, VS6, Visual Studio, Dev

Posted: 11 Jun 2002
Updated: 11 Jun 2002
Views: 95,556
Bookmarked: 33 times
Announcements
Want a new Job?



Search    
Advanced Search
Sitemap
25 votes for this Article.
Popularity: 6.25 Rating: 4.47 out of 5
0 votes, 0.0%
1
0 votes, 0.0%
2
1 vote, 6.3%
3
2 votes, 12.5%
4
13 votes, 81.3%
5

Introduction

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

Taskbar Sorter

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 which are top-level (ie have no owner), and do not explicitly prevent themselves 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 can then re-order the windows. When the user clicks the Sort button, each window is hidden 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 of interrogating 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!

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

About the Author

Paul S. Vickery


Originally from an electronics background, Paul moved into software in 1996, partly as a result of being made redundant, and partly because he was very much enjoying the small amount of coding (in-at-the-deep-end-C) that he had been doing (the only programming he had done prior to that was a little Pascal, and ZX Spectrum Basic!).

Paul swiftly moved from C to C++, and learned MFC, and then went on to real-time C on Unix. After this he moved to the company for which he currently works, which specialises in Configuration Management, and programs in C/C++, for Windows. He has been gradually moving their legacy C code over to C++/MFC, pulling in other new technologies as he goes where appropriate.

Paul uses Visual Studio 2005, his own in-house-designed editor based on Andrei Stcherbatchenko's syntax parsing classes, and various other freeware tools.

Occupation: Software Developer (Senior)
Location: United Kingdom United Kingdom

Other popular Applications & Tools articles:

Article Top
Sign Up to vote for this article
You must Sign In to use this message board.
FAQ FAQ Noise ToleranceSearch Search Messages 
 Layout  Per page   
 Msgs 1 to 25 of 29 (Total in Forum: 29) (Refresh)FirstPrevNext
Subject  Author Date 
Question.Net Codememberplury6:16 19 Feb '07  
GeneralDrag and Drop buttons on Taskbar and save ordermemberThe Code Machine22:14 27 Jan '06  
GeneralRe: Drag and Drop buttons on Taskbar and save ordermemberSa6ry8:06 3 Apr '06  
GeneralSave the OrdermemberHerrDamit4:35 8 Aug '04  
GeneralRe: Save the Ordermemberkpatel1089:19 29 Oct '04  
GeneralRe: Save the OrdermemberDTY9:45 15 Aug '05  
GeneralRe: Save the OrdermemberDTY7:08 22 Jun '06  
GeneralWindows XPmemberwayside7:43 28 Jul '04  
GeneralIcon Color ImprovementmemberAtlantys20:27 16 Jun '02  
GeneralJames would be tickled by thismemberNish - Native CPian20:05 12 Jun '02  
GeneralRe: James would be tickled by thismemberPaul S. Vickery23:31 12 Jun '02  
GeneralRe: James would be tickled by thismemberNish - Native CPian0:46 13 Jun '02  
GeneralPC Mag has similar utilitymemberAnonymous15:31 12 Jun '02  
GeneralRe: PC Mag has similar utilitymemberPaul S. Vickery23:34 12 Jun '02  
GeneralRe: PC Mag has similar utilitymembervikrant kpr4:56 13 Jul '07  
GeneralRe: PC Mag has similar utilitymemberPhilippe Lhoste1:42 24 Jun '02  
GeneralRe: PC Mag has similar utilitymemberSynetech17:34 12 Aug '06  
GeneralCoolmemberRama Krishna4:24 12 Jun '02  
GeneralRe: CoolmemberAtlantys21:21 12 Jun '02  
GeneralRe: CoolmemberPaul S. Vickery23:37 12 Jun '02  
GeneralRe: CoolmemberToni Navarro0:11 13 Jun '02  
GeneralOrdermemberLaurent Kempé0:51 12 Jun '02  
GeneralRe: OrdermemberPaul S. Vickery1:46 12 Jun '02  
GeneralRe: OrdermemberLaurent Kempé2:26 12 Jun '02  
GeneralRe: OrdermemberHenry Jacobs9:37 12 Jun '02  

General General    News News    Question Question    Answer Answer    Joke Joke    Rant Rant    Admin Admin   

PermaLink | Privacy | Terms of Use
Last Updated: 11 Jun 2002
Editor: Brian Delahunty
Copyright 2002 by Paul S. Vickery
Everything else Copyright © CodeProject, 1999-2008
Web07 | Advertise on the Code Project