用于计算 Windows XP 上桌面图标间距的公式或 API
我构建了一个简单的应用程序,它将网格线应用于图像或仅将简单的颜色用作桌面壁纸。 这个想法是桌面图标可以排列在网格内。 问题是,取决于比我理解的更多的事情,实际的像素间距似乎因系统而异。 我了解到至少这些因素起到了一定的作用:
- 分辨率(废话)
- 任务栏大小和位置
- 字体
还不止这些。 也许有一些我不知道的 api 调用?
I've built a simple application that applies grid-lines to an image or just simple colors for use as desktop wallpaper. The idea is that the desktop icons can be arranged within the grid. The problem is that depending on more things than I understand the actual spacing in pixels seems to be different from system to system. I've learned that at least these things play a factor:
- Resolution (duh)
- Taskbar size and placement
- Fonts
There has to be more than this. Maybe there's some api call that I don't know about?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
有 1001 种方法来获取/设置它(但我只知道 2):-D
Windows Register:
值是 IconSpacing 和 IconVerticalSpacing
通过代码:
using System 。管理;
公共字符串 GetWinIconSpace()
{
}
和我从未尝试过的第三个你可以找到它这里
there are a 1001 ways to get/set this (but I only know 2) :-D
Windows Register:
values are IconSpacing and IconVerticalSpacing
by code:
using System.Management;
public string GetWinIconSpace()
{
}
and the 3rd that I never tried you can find it here
如果所请求的图标尺寸不可用,则它们也可能是由于缩放算法而导致的尺寸问题。
(因为图标文件实际上是图标的集合,正如这个线程中关于 图标和光标知道它们来自哪里,来自旧的新的事情)
They might also be a size problem due to scaling algorithm if the requested size of the icon is not available.
(since an icon file is actually a collection of icons, as explained in this thread about Icons and cursors know where they came from, from the The Old New Thing)