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 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!

Downloads

Download exe - 100 Kb
Download source (includes exe) - 114 Kb



Comments

  • try XNeat @ www.xneat.com ( sort using mouse drag & drop )

    Posted by mr_sekoskeo on 10/20/2005 06:25am

    i use this software XNEAT to sort my taskbar items ... you can find it at http://www.xneat.com/

    Reply
  • Great!! Nice for us anal folks!

    Posted by Legacy on 02/04/2003 12:00am

    Originally posted by: Mike

    Great!! Nice for us anal folks!

    Reply
  • Very Cool!

    Posted by Legacy on 08/07/2002 12:00am

    Originally posted by: Paul

    Very Cool!

    Thanks.

    Reply
  • Better way to reorder taskbar buttons!

    Posted by Legacy on 07/11/2002 12:00am

    Originally posted by: Ian Prest

    (no email, please)
    
    

    I wrote a similar utility a while back. It's available
    at http://utilities.prest.ca/. The basics are similar.
    No drag & drop, but you can reorder buttons quickly using
    the keyboard (using Ctrl+Arrows).

    At first, I was using the show/hide method to reorder the
    buttons (as was mentioned in this article). But I
    discovered a better way, using COM and the ITaskbarList
    interface. Here's a code snippet:

    CoInitialize(NULL);
    ITaskbarList *pTaskbar = NULL;
    CoCreateInstance(CLSID_TaskbarList, NULL, CLSCTX_SERVER, IID_ITaskbarList, (LPVOID*)&pTaskbar);

    if(pTaskbar) {
    pTaskbar->HrInit();
    for(int i=0;i<dlg.m_ItemList.GetSize();i++) {
    pTaskbar->DeleteTab(dlg.m_ItemList.GetAt(i)->m_hwnd);
    }
    for(i=0;i<dlg.m_ItemList.GetSize();i++) {
    pTaskbar->AddTab(dlg.m_ItemList.GetAt(i)->m_hwnd);
    }
    }
    CoUninitialize();

    As you can see, I basically just delete all the buttons on
    the taskbar, and then re-add them in the desired order.
    The end result is the same as the show/hide method, but
    it's somewhat faster because it doesn't result in any
    applications redrawing themselves.

    Reply
  • Get default sort

    Posted by Legacy on 06/25/2002 12:00am

    Originally posted by: Brad Pirtle

    Get idea! I always wanted this - the task bar should have the drag/reorder built in but its not...
    Couldn't you loop over the windows and get the origional tab order (zorder) to initialize it to the correct current order??

    Reply
  • Very cool. Refresh is missed.

    Posted by Legacy on 06/22/2002 12:00am

    Originally posted by: Alexi Jordanov

    Like Chris says this is very usefull utility when explorer crushes. Sometimes I dreamed for such as utility that will give me possibilities to place most important application at left side. Another example of use is Java application that are started with console. If you start quickly two GUI Java apps you can have 2 console, 2 GUI on taskbar. It's very comfortable to have console, GUI, console and GUI on taskbar to differentiate easy coressponding console of any GUI.

    It'll be good to put one button for refresh or to make refresh per minute or less.

    Regards, Alex

    Reply
  • Nice Utility

    Posted by Legacy on 06/21/2002 12:00am

    Originally posted by: Chris Richardson

    Very useful for those times when you accidentally happen to crash Explorer and you want your task bar back in the order it was in before.

    Chris Richardson

    Reply
Leave a Comment
  • Your email address will not be published. All fields are required.

Top White Papers and Webcasts

  • As all sorts of data becomes available for storage, analysis and retrieval - so called 'Big Data' - there are potentially huge benefits, but equally huge challenges...
  • The agile organization needs knowledge to act on, quickly and effectively. Though many organizations are clamouring for "Big Data", not nearly as many know what to do with it...
  • Cloud-based integration solutions can be confusing. Adding to the confusion are the multiple ways IT departments can deliver such integration...

Most Popular Programming Stories

More for Developers

RSS Feeds

Thanks for your registration, follow us on our social networks to keep up-to-date