Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Shaun E on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

GetManifestResourceStream (what?) 1

Status
Not open for further replies.

golcarlad

Programmer
Nov 23, 2004
232
GB
What the hell is:

GetManifestResourceStream

- looked at the MSDN help but doesnt really help me any further.

Anybody who can shed light on this in laymans terms would be a star!
 
It allows you to pull resources (Images, Icons, etc) which are included in your solution.

So if you have

MySolution
References
Images
-FastForward.gif (Embedded Resource)
AssemblyInfo.cs
Form1.cs

your form could say:

Stream s = Assembly.GetExecutingAssembly().GetManifestResourceStream("MySolution.Images.FastForward.gif");

PictureBox1.Image = Image.FromStream(s);

Now your picture has been pulled from the embedded solution resource file and is being used in your picture box. Remember that any resource that you want to use this way must have the Compile Action property set to "Embedded Resource"

hope that helps.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top