1
我需要在visual studio中的工具箱中的所有控件的图标(图像)。有任何我可以使用的链接?哪里可以找到visual studio的工具箱图标?
我需要在visual studio中的工具箱中的所有控件的图标(图像)。有任何我可以使用的链接?哪里可以找到visual studio的工具箱图标?
图标作为嵌入资源存储在托管控件的相应.NET程序集中。所以没有你可以使用的链接。您将需要从程序集中提取它。例如,要从System.Windows.Forms程序集中提取按钮的图标,可以使用以下代码:
var assembly = Assembly.Load("System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089");
using (var stream = assembly.GetManifestResourceStream("System.Windows.Forms.Button.bmp"))
using (var reader = new BinaryReader(stream))
{
byte[] image = reader.ReadBytes((int)stream.Length);
File.WriteAllBytes("button.bmp", image);
}