windows 在 C# 应用程序中使用系统图标
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/8931442/
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
Working with system icons in C# application
提问by The Mask
Where can I find all system icons used in Windows XP/Vista/7? Is it possible?
在哪里可以找到在 Windows XP/Vista/7 中使用的所有系统图标?是否可以?
I tried using SHGetStockIconInfo(), but it returns only some icons.
我尝试使用SHGetStockIconInfo(),但它只返回一些图标。
回答by Kelsey
For Windows 7 you can find many of the icons here:
对于 Windows 7,您可以在此处找到许多图标:
%SystemRoot%\system32\DDORes.dll
%SystemRoot%\system32\imageres.dll
%SystemRoot%\system32\shell32.dll
I wouldn't recommend extracting them and using them though as that would be a copyright violation I think.
我不建议提取它们并使用它们,因为我认为这会侵犯版权。
You can get a whole bunch of windows images within Visual Studio as explained here:
您可以在 Visual Studio 中获取一大堆 Windows 图像,如下所述:
http://msdn.microsoft.com/en-us/library/ms246582.aspx
http://msdn.microsoft.com/en-us/library/ms246582.aspx
The Visual Studio 2010 Image Library contains application images that appear in Microsoft Windows, the Office system, Microsoft Visual Studio, and other Microsoft software. You can use this set of over 1,000 images to create applications that look visually consistent with Microsoft software.
Visual Studio 2010 图像库包含出现在 Microsoft Windows、Office 系统、Microsoft Visual Studio 和其他 Microsoft 软件中的应用程序图像。您可以使用这组超过 1,000 个图像来创建在视觉上与 Microsoft 软件一致的应用程序。
EDIT:
编辑:
Requested Visual Studio 2008 version:
请求的 Visual Studio 2008 版本:
http://msdn.microsoft.com/en-us/library/ms246582(v=vs.90).aspx
http://msdn.microsoft.com/en-us/library/ms246582(v=vs.90).aspx
And for completeness the Visual Studio 2005 version:
为了完整起见,Visual Studio 2005 版本:
http://msdn.microsoft.com/en-us/library/ms246582(v=vs.80).aspx
http://msdn.microsoft.com/en-us/library/ms246582(v=vs.80).aspx
回答by Brandon
Without specifying exactly which icons you're talking about, there is a SystemIconsclass in the System.Drawing
namespace.
没有具体说明您正在谈论哪些图标,命名空间中有一个SystemIcons类System.Drawing
。