Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 866
  • Last Modified:

Moving desktop icons

I would like to write an application that can read the positions of the desktop icons, change them and then write them back.

How do I access the position of the desktop icons from .Net? Ideally VB.Net, but C# is ok to.

0
Llandr
Asked:
Llandr
  • 2
1 Solution
 
AlexFMCommented:
This is complicated task which may be implemented using Windows API. The problem is that Desktop is ListView control which belongs to another process. This is VC++ application which does this:

http://www.codeguru.com/Cpp/misc/misc/article.php/c3807/
0
 
LlandrAuthor Commented:
I will accept AlexFM:s answer since it solves the immediate problem.
I would have liked a C# or .Net solution but it seems that I will have to make do.
0
 
AlexFMCommented:
There is no pure .NET solution for this problem. You can use PInvoke to call API from C#, and if solution contains hook Dll, this Dll cannot be managed.
0

Featured Post

Get expert help—faster!

Need expert help—fast? Use the Help Bell for personalized assistance getting answers to your important questions.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now