Solved

How do I embed SVG-Icons in Visual Studio?

Posted on 2010-11-23
1
1,519 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

The Eight Noble Truths of Backup and Recovery

How can IT departments tackle the challenges of a Big Data world? This white paper provides a roadmap to success and helps companies ensure that all their data is safe and secure, no matter if it resides on-premise with physical or virtual machines or in the cloud.

Question has a verified solution.

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

After several hours of googling I could not gather any information on this topic. There are several ways of controlling the USB port connected to any storage device. The best example of that is by changing the registry value of "HKEY_LOCAL_MACHINE\S…
A theme is a collection of property settings that allow you to define the look of pages and controls, and then apply the look consistently across pages in an application. Themes can be made up of a set of elements: skins, style sheets, images, and o…
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…

831 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