How to display an image via .Net's Resource file.

Knowledge exchange related to the VPE Report Engine and PDF Library

Moderator: IDEAL Software Support

How to display an image via .Net's Resource file.

Postby Mr_Data_Guy » Wed Apr 25, 2012 11:07 pm

I am able to display an image in VB.net like so:

Code: Select all
Me.vpe.Picture(0.5, 0.5, 2.5, 2.5, "S:\Images\S.bmp")


But what I want to be able to display the image not from a file on disk but from a resource image built into the exe. Something like:

Code: Select all
Me.vpe.Picture(0.5, 0.5, 2.5, 2.5, "S.bmp")


e.g. I do not want *.BMP files external to the exe
Any Suggestions?
Mr_Data_Guy
 
Posts: 8
Joined: Sat Apr 07, 2012 11:31 pm

Re: How to display an image via .Net's Resource file.

Postby IDEAL Software Support » Thu Apr 26, 2012 12:48 pm

You can either convert the bitmap resource in memory at runtime to a DIB and use the method PictureDIB().

Another option is to use memory streams (requires VPE Professional Edition or higher) together with the method PictureStream().
IDEAL Software Support
 
Posts: 1621
Joined: Thu Nov 18, 2004 4:03 pm


Return to VPE Open Forum

Who is online

Users browsing this forum: No registered users and 16 guests

cron