Reputation: 81
I have been tasked to develop a module which requires me to get the coordinates of files in Windows Explorer.
Here is the use case:
My program opens up Windows Explorer into a certain folder (for example, C:\FavoriteVideo). The user does his arrangement of all the files and folders. There is a trigger for the program to save all the coordinates of the files and folders to a data structure (it may be a Hashtable
) . I plan to use a Windows Service to perform this. (I am familiar with C#).
Please ask if you require any more information.
Upvotes: 3
Views: 774
Reputation: 22486
[EDIT: New information found with the location in the Registry] Via a thread at http://help.lockergnome.com/windows2/Desktop-Icons-Position--ftopict450729.html I discovered that the Shell Bags registry keys, such as HKCU/Software/Microsoft/Windows/Shell/Bags/1/Desktop , seem to contain icon positioning information. Hope this helps!
I've heard that the Windows NT resource kit comes with layout.dll which exposes shell extension functions to retrieve and alter the user's icon layout. Perhaps that will work. I'm curious about this myself.
You might also try looking up how any of these programs do it, for example by looking at the symbols used therein:
http://www.howtogeek.com/howto/windows-vista/save-and-restore-desktop-icon-layout-in-windows-vista/
http://www.addictivetips.com/windows-tips/save-and-restore-the-position-of-desktop-icons-in-windows/
http://www.pchell.com/support/savedesktoplayout.shtml
Upvotes: 2