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);
}