如何以编程方式从 Windows 桌面移动图标的位置?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/7436062/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
How to programmatically move icons' location from Windows Desktop?
提问by Diogo
I wish to create a startup job that every time that my Windows starts, it will rearrange some shortcut icons from my desktop to another location, such as right-bottom for example.
我希望创建一个启动作业,每次我的 Windows 启动时,它都会将一些快捷方式图标从我的桌面重新排列到另一个位置,例如右下角。
Can I make it with VBScript, Powershell, bat command script or even with C\C++\C#\Java?
我可以用 VBScript、Powershell、bat 命令脚本甚至 C\C++\C#\Java 来制作它吗?
采纳答案by Giorgi
Desktop is an ordinary listview so you can use windows api to move items to different locations. Have a look at this similar question: How can I programmatically manipulate Windows desktop icon locations?
桌面是一个普通的列表视图,因此您可以使用 windows api 将项目移动到不同的位置。看看这个类似的问题:如何以编程方式操作 Windows 桌面图标位置?