Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Where are desktop icon co-ord's kept?
Message
De
16/11/2004 04:04:47
 
 
À
15/11/2004 12:46:18
Information générale
Forum:
Visual FoxPro
Catégorie:
Fonctions Windows API
Versions des environnements
Visual FoxPro:
VFP 8
OS:
Windows XP
Database:
Visual FoxPro
Divers
Thread ID:
00961439
Message ID:
00961632
Vues:
8
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
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform