Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Where are desktop icon co-ord's kept?
Message
From
16/11/2004 04:04:47
 
 
To
15/11/2004 12:46:18
Scott Barker
Barker Systems Consulting Ltd.
North Vancouver, British Columbia, Canada
General information
Forum:
Visual FoxPro
Category:
Windows API functions
Environment versions
Visual FoxPro:
VFP 8
OS:
Windows XP
Database:
Visual FoxPro
Miscellaneous
Thread ID:
00961439
Message ID:
00961632
Views:
7
This message has been marked as the solution to the initial question of the thread.
>Hi there.
>
>Does anyone know where the actual screen co-ords are kept for desktop icons in Windows (and how to set them)?
>
>I have no idea and after doing a fair bit of searching, I've come up empty. It's an odd request but a client wants my program (which runs in the logon) to ensure that a couple of desktop icons are in a certain place on the screen.
>
>Any help on this would be greatly appreciated.
>
>TIA, Scott

Hi Scott,

I haven't try this on NT based system, only on ME. But I don't think they are (much) different.
There are two options to get the desktop icon position. The first option (the easy way) is to get it from registry. It is stored as REG_BINARY in:

HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Streams\Desktop\ViewView2

So, you can just read its value, then parse each icon. The icon is structured like this:
1. left (dword)
2. top (dword)
3. icon long name (chars)
4. icon short name (chars)


HTH
Herman
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform