embedding resources 
Author Message
 embedding resources

I have a picturebox control with a default image in it. That image file is
an embedded resource. If a certain event occurs the image in this picturebox
will change. I know how to specify what file to change it to if that image
file were external but what if I want to make it an embedded resource as
well?

Me.pbPinPref.Image = what goes here?

Russ

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system ( http://www.*-*-*.com/ ).
Version: 6.0.459 / Virus Database: 258 - Release Date: 25/02/2003



Sun, 21 Aug 2005 20:38:44 GMT  
 embedding resources
Hello Russ,


Quote:
> I have a picturebox control with a default image in it. That image
file is
> an embedded resource. If a certain event occurs the image in this
picturebox
> will change. I know how to specify what file to change it to if that
image
> file were external but what if I want to make it an embedded resource
as
> well?

> Me.pbPinPref.Image = what goes here?

\\\
Me.picMyPicture.Image = CType( _
    New Bitmap( _

System.Reflection.Assembly.GetExecutingAssembly().GetManifestResourceStr
eam( _
            "<ProjectName>.<FileName>" _
        ) _
    ), _
    Image _
)
///

Don't forget to mark the bitmaps as embedded resources. Use your own
values instead of <ProjectName> and <FileName>.

Regards,
Herfried K. Wagner



Sun, 21 Aug 2005 20:52:15 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Playing WAV from Embedded Resource

2. Help with loading embedded resources

3. Reference embedded resource

4. How to access embedded resources?

5. Embedded Resource (.ico or .bmp) and ListView

6. ImageList and an embedded resource file.

7. Using "embedded resources"

8. Web control using embedded resource

9. GIFs as Embedded Resources

10. Embedded Resources in VB

11. Embedded resources in a VB project using VS.Net?

12. Embed sounds into VB resources

 

 
Powered by phpBB® Forum Software