Can anyone tell me how to create a resource file and incorporate into a VB5 application? I have several bitmaps that I would like to enclose within 1 file. Thanks.
Printable View
Can anyone tell me how to create a resource file and incorporate into a VB5 application? I have several bitmaps that I would like to enclose within 1 file. Thanks.
Use the Resource Compiler to make resource files. The documentation and the compiler are found in your Tools folder under the following path Tools\Rc\. To use them in your App, you must use the LoadResPicture function.
For example, put the following into your resource script.
Now compile the script and the newly created resource file to your project.Code:200 CUSTOM PRELOAD mybmp.bmp
Insert the following code into a Form with a PictureBox and a CommandButton.
Code:Private Sub Command1_Click()
'Load the resource into Picture1
Set Picture1.Picture = LoadResPicture(200, vbResBitmap)
End Sub