How can I programmatically manipulate Windows desktop icon locations?

If I’m not mistaken the desktop is just a ListView, and you’ll have to send the LVM_SETITEMPOSITION message to the handle of the desktop.

I googled a bit for some c# code and couldn’t find a example, but I did found the following article. Torry: …get/set the positions of desktop icons?. It’s delphi code, but I find it very readable and with some P/Invokes you’ll be able to translate it to c#.

Leave a Comment