We help IT Professionals succeed at work.

Is there is an API, script, or SendMessage mechanism to manipulate the Desktop icon Auto Arrangement?

Last Modified: 2013-12-03
I have a product that requires resolution change to 800x600 in Vista, which rearranges Desktop icons for users that have Auto Arrange turned off.

I want to know if there is an API, or script, or SendMessage mechanism to allow the detection of current state and toggling of current state of the Destop icon Auto Arrangement features?
Watch Question

   I take this as being a fat application (exe on the box) versus a web application, correct?
Those settings are in the registry under HKCU and you should be able to simply toggle it on.
These are for XP and should be similar for Vista...  See if that helps any...

-Cheers, Peter.


Auto Arrange off, Align to Grid off:

Auto Arrange on:

Auto Arrange off - align to Grid On:

Auto Arange on, Align to Grid on:

Hide Desktop Icons:

Sort by name:

Sort by size:

Sort by type:

Sort by Modified:


Thanks Peter,

It is a Windows App for processing multimedia, and because of media player issues in Vista, full screen playback is using too much CPU so we are reducing the resolution to decrease the video source and smoothout playback.

That Registry information seems to be sort of a blueprint of the state at startup, but is not interactive.  I believe the threads I found on this topic going back to 2003 or earlier indicated that even if the Registry keys were updated, that they were still reverted on reboot tossing out the new values.

If I change the the registry value for FFlags, the desktop does not update, even if I refresh the desktop, and conversely if I change the values from the Desktop context menu and refresh the Registry viewer the values do not change.

I found references to IShellFolderView interface which has AutoArrange() and GetAutoArrange() methods but it is deprecated and I cannot find any examples on populating and using the interface.

It's maddening I tell You!  I needs a beer...

- Best Regards, Robert
   Humm...  don't know the newer syntax (been out of the windows programming world for too long now...) but I do know that it is possible through the DirectX API to set a resolution and do video playback without effecting the desktop at all.   DVD video playback though DirectX on a video layer is where I remember seeing it.

  I don't know what your distribution mechanism is going to look like or what your intended audience is... but two other things...  1) you could script the action against the interface by getting the desktop's window handle and making key calls to it.  2) you could try something like this DLL here.  This is for VB, but you can make calls against it from C++...   That is assuming that you distribute with the DLL...

  After thinking about your intent... Or my understanding of your intent to be precise... I would seriously suggest that you look into saving the desktop icons positions and then restoring as you quit...  I personally like my icons arranged a certain way for organization purposes... and I get very torqued when my icons clump up in a corner of the screen.  You could also accomplish this by killing the explorer process and restarting it on quit.

Just some more thoughts...
-Cheers, Peter.
This one is on us!
(Get your first solution completely free - no credit card required)


Sorry for the abscence, I was periodically checking for updates and never closed the question.

Peter's suggestion to save/restore the icon positions was the way we went via a 3rd party commercial solution, but did not really solve that problem, so I just waited.  If that justifies awarding him the points, so be it, otherwise I would agree with "Delete" resolution.
Forced accept.

EE Admin
Unlock the solution to this question.
Join our community and discover your potential

Experts Exchange is the only place where you can interact directly with leading experts in the technology field. Become a member today and access the collective knowledge of thousands of technology experts.

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.


Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.