Click here to Skip to main content
6,635,160 members and growing! (13,237 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, VC7Win2K, WinXP, MFC, Dev
Posted:11 Jun 2002
Views:111,297
Bookmarked:41 times
Announcements
Loading...
 
Search    
Advanced Search
Add to IE Search
printPrint   add Share
      Discuss Discuss   Broken Article?Report  
26 votes for this article.
Popularity: 6.34 Rating: 4.48 out of 5

1

2
1 vote, 5.9%
3
2 votes, 11.8%
4
14 votes, 82.4%
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


Member
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
You must Sign In to use this message board.
FAQ FAQ 
 
Noise Tolerance  Layout  Per page   
 Msgs 1 to 25 of 32 (Total in Forum: 32) (Refresh)FirstPrevNext
GeneralDont work with "Group similar taskbar buttons" enabled. [modified] PinmemberAlejandro Pardo10:05 30 Dec '08  
AnswerRe: Dont work with "Group similar taskbar buttons" enabled. PinmemberPaul S. Vickery1:56 6 Jan '09  
GeneralRe: Dont work with "Group similar taskbar buttons" enabled. PinmemberAlejandro Pardo2:34 6 Jan '09  
Question.Net Code Pinmemberplury6:16 19 Feb '07  
GeneralDrag and Drop buttons on Taskbar and save order PinmemberThe Code Machine22:14 27 Jan '06  
GeneralRe: Drag and Drop buttons on Taskbar and save order PinmemberSa6ry8:06 3 Apr '06  
GeneralSave the Order PinmemberHerrDamit4:35 8 Aug '04  
GeneralRe: Save the Order Pinmemberkpatel1089:19 29 Oct '04  
GeneralRe: Save the Order PinmemberDTY9:45 15 Aug '05  
GeneralRe: Save the Order PinmemberDTY7:08 22 Jun '06  
GeneralWindows XP Pinmemberwayside7:43 28 Jul '04  
GeneralIcon Color Improvement PinmemberAtlantys20:27 16 Jun '02  
GeneralJames would be tickled by this PinmemberNish - Native CPian20:05 12 Jun '02  
GeneralRe: James would be tickled by this PinmemberPaul S. Vickery23:31 12 Jun '02  
GeneralRe: James would be tickled by this PinmemberNish - Native CPian0:46 13 Jun '02  
GeneralPC Mag has similar utility PinmemberAnonymous15:31 12 Jun '02  
GeneralRe: PC Mag has similar utility PinmemberPaul S. Vickery23:34 12 Jun '02  
GeneralRe: PC Mag has similar utility Pinmembervikrant kpr4:56 13 Jul '07  
GeneralRe: PC Mag has similar utility PinmemberPhilippe Lhoste1:42 24 Jun '02  
GeneralRe: PC Mag has similar utility PinmemberSynetech17:34 12 Aug '06  
GeneralCool PinmemberRama Krishna4:24 12 Jun '02  
GeneralRe: Cool PinmemberAtlantys21:21 12 Jun '02  
GeneralRe: Cool PinmemberPaul S. Vickery23:37 12 Jun '02  
GeneralRe: Cool PinmemberToni Navarro0:11 13 Jun '02  
GeneralOrder PinmemberLaurent Kempé0:51 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-2009
Web10 | Advertise on the Code Project