Working With Resource File

Lesson 1
Tutorials - Page 1 - Page 2 - Page 3 - Page 4 - Page 5 - Page 6 - Page 7 - Page 8 - Page 9 - Page 10

What is Resource File?
Resource file is file that can contains multiple image files (BMP, GIF, JPG, ICO and more), Cursors (CUR), Sound files and other files.
All these files can be in single Resource file, and you can access them from your program. For example, you can load an icon from resource file to your Command Button.
Resource file has RES extension.

Why should I use Resource File?
Resource file is very useful when you use the same image several times in your code.
For example, you have two Command Buttons with the same icon or two Picture Boxes with the same BMP picture.
If you won't use resource file, but simply add the same icon to both Command Buttons Picture property, the icon will be embedded in each of the Command Buttons. so actually, your icon will be saved twice, and your application file will be bigger.
If you'll use resource file, you will have only 1 icon saved in your application.

Back Home  Forward