471,334 Members | 1,458 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,334 software developers and data experts.

this embedded

evening everyone

i want to move some code from in a function thingy to in the class. its
Bitmap back = (Bitmap)Bitmap.FromStream(this.GetType().Assembly. GetManifestResourceStream("WindowsApplication1.bac k.gif"));


which loads the embedded resource to a new bitmap but it says that
'this' isnt available in the context - pls help me. r

Dec 2 '05 #1
1 1037
which loads the embedded resource to a new bitmap but it says that
'this' isnt available in the context - pls help me. r


You can replace this.GetType().Assembly with
typeof(YourClass).Assembly or Assembly.GetExecutingAssembly().
Mattias

--
Mattias Sjögren [C# MVP] mattias @ mvps.org
http://www.msjogren.net/dotnet/ | http://www.dotnetinterop.com
Please reply only to the newsgroup.
Dec 2 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

2 posts views Thread by Aquarius2431 | last post: by
9 posts views Thread by yawnmoth | last post: by
26 posts views Thread by jini us | last post: by
1 post views Thread by Chris Stephens | last post: by
83 posts views Thread by deppy_3 | last post: by
2 posts views Thread by Carl J. Van Arsdall | last post: by
3 posts views Thread by Jeff Louie | last post: by
reply views Thread by rosydwin | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.