Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/visual-studio/7.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Visual studio 在哪里可以找到visual studio的工具箱图标?_Visual Studio - Fatal编程技术网

Visual studio 在哪里可以找到visual studio的工具箱图标?

Visual studio 在哪里可以找到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=b7

我需要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);
    }