Link to home
Start Free TrialLog in
Avatar of hckhiu
hckhiu

asked on

use DLL resource to fill picturebox

i use Borland REsource Workshop to make a DLL resource.
i got 1 bmp file (file type BMP, file name BMP1) and 1 JPEG file (file type JPG, filename JPG1). (note bmp is default support by the borland workshop, while jpeg is user define).

how can i use the above picture file to fill let say picturebox1 in VB ?

i have asked this question at many different forums and mailing lists, but now yet been answered for year. hope someone can answer this question here.

thanks for help
keong
ASKER CERTIFIED SOLUTION
Avatar of MikeP090797
MikeP090797

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
The best way is to use .RES format in Resource Workshop, and add .RES file to your VB project.
There is VB example in your vb5\samples\PGuide\ATM directory.
It shows how to load picture, cursor, sound or string from your Resource file.

For dlls, it is not that simple. LoadResource is complicated (you must also use LockResource and UnLockResource...). There are easier API functions for each type of resource (e.g. LoadBitmap, LoadIcon, LoadCursor...)