winforms - C# Visual Studio using resource files -
i'm trying add 2 image files solution, compiled .exe, can load them right there instead of absolute path on computer.
i believe need use resource files in visual studio, never have before. if i'm on wrong track, please correct me.
here's i've done far. in visual studio 2010 solution explorer, right click properties → open → resources → add resource → add existing file...
so have both images in properties → resources tab. how them out in c# code?
i'm using c#, windows forms , visual studio 2010.
picturebox pic; pic.image = new bitmap( /* address now? */ );
you can them properties.resources.<name_of_your_resource>
Comments
Post a Comment