"How do I use the user32.dll to get
the location of each of the icons."


Someone has already written a solution for this: one was written in
Delphi
and the other in VB.NET:

1) Delphi  :  http://www.swissdelphicenter.ch/torry/showcode.php?id=1897
2) VB.NET: 
http://www.dotnetmonster.com/Uwe/Forum.aspx/dotnet-interop/6433/Retrieving-Desktop-Icon-Positions


All you need now is to translate this to C#. Just pick the language
you are
most familiar with and start translating it from there.

Hope this helps.


Good luck!


Benj


On Jun 2, 2:11 am, Paul J Warner <[email protected]> wrote:
> Hi all,
>
> I am trying to learn how to manipulate the icons on the desktop.  I am
> aware that I am going to have to use p/invokes to accomplish this and
> have so far only managed to use LVM_GETITEMCOUNT to work.  So I can
> count the amount of icons currently on my desktop.  Ultimately I would
> like to be able to record the current location of the icons on the
> desktop and save their X,Y Coords to maybe an XML file or something.
> That way I can later recall their  location with the SETITEM property
> or something.  My hurdle seems to be in the user32.dll and usage of
> it.
>
> I suppose the full extent of my question is as follows understanding
> that the desktop is a listview.  How do I use the user32.dll to get
> the location of each of the icons.  So far all my attempts have been
> futile.  The link below is to the current code implementation
>
> http://pastebin.com/m62b51a4b(not really sure how the code will look
> if i attempt to paste it here)
>
> None the less any direction provided here would be of great value to
> me.  Thanks in advance.
>
> Paul

Reply via email to