Solved

How do I embed SVG-Icons in Visual Studio?

Posted on 2010-11-23
1
1,539 Views
Last Modified: 2013-11-27
Hi,

does anyone of you know how to embed SVG-Icons for a toolstrip in Visual Studio?

0
Comment
Question by:keithbartlett1
1 Comment
 
LVL 4

Accepted Solution

by:
dquebe earned 500 total points
ID: 34200982
As in a toolstrip control in an WPF application, WinForms, ASP, ? For the most part when you add an image to the solution, you can get to the properties and change the "Build Action" to "Embedded Resource" versus the default "Resource".

http://msdn.microsoft.com/en-us/library/7k989cfy(VS.80).aspx

[From link]
Accessing Resources at Run-Time
To access a resource at run-time, simply reference it as you would any other class member. The following example shows how to retrieve a bitmap resource that you named Image01. Note that the Resources class is in a namespace called <projectName>.Properties, so you must either user the fully qualified name for each resource or else add the appropriate using directive in the source file from which you are accessing the Resources class.

System.Drawing.Bitmap bitmap1 = myProject.Properties.Resources.Image01;

Internally the get property uses the ResourceManager class to create a new instance of the object.
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Visual Fox Pro commands 15 50
Mixed results 10 90
Where to obtain Oracle Data Provider for .NET 3.5 7 54
Question to Pivot table 1 63
zlib is a free compression library (a DLL) on which the popular gzip utility is built.  In this article, we'll see how to use the zlib functions to compress and decompress data in memory; that is, without needing to use a temporary file.  We'll be c…
Whether you've completed a degree in computer sciences or you're a self-taught programmer, writing your first lines of code in the real world is always a challenge. Here are some of the most common pitfalls for new programmers.
This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA. http://www.experts-exchange.com/videos/1478/Excel-Error-Handlin…
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…

860 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question