Discussion:
Arrange windows 7 taskbar buttons ?
(too old to reply)
Vilius Mockûnas
2010-03-30 11:36:20 UTC
Permalink
Hi,

Windows 7 has this feature.
What API to use to do it programmatically ?

thnaks
Vilius
Leo Davidson
2010-03-30 14:21:04 UTC
Permalink
Post by Vilius Mockûnas
Windows 7 has this feature.
What API to use to do it programmatically ?
I'd be surprised if there is an API for it.

The shell (quite rightly) views the taskbar as "the user's" and
doesn't allow programs to mess with it.
skilledDeveloper
2010-04-22 14:37:01 UTC
Permalink
Hi Vilius,

You need to send a TB_MOVEBUTTON message to change order of taskbar buttons.
TB_MOVEBUTTON Documentation:
http://msdn.microsoft.com/en-us/library/bb787387%28VS.85%29.aspx)

There is a helpful CodeProject article that uses the same method for
arranging taskbar buttons. You can take a look at it:
http://www.codeproject.com/KB/shell/taskbarsorter.aspx

You can also add, delete or activate any button on taskbar using
ITaskbarList interface functions:
ITaskbarList::AddTab
ITaskbarList::DeleteTab
ITaskbarList::ActivateTab

You can find the C# signature and sample source code for the ITaskbarList
interface at:
http://www.pinvoke.net/default.aspx/shell32/ITaskbarList.html
--
Visit my blog: http://csharptips.wordpress.com/
Post by Vilius Mockûnas
Hi,
Windows 7 has this feature.
What API to use to do it programmatically ?
thnaks
Vilius
.
Loading...