Using Your Own Resources

Resources are the Windows Way of handling large data chunks in Visual Basic. The Test Resources project (TRES.VBP) illustrates some important points about resources. This is an international program, designed for simultaneous release in the United States of America and the Republic of Swinen. The program was written and will be maintained by American programmers in the United States. Nonprogrammers in the United States and Swinen created separate resource files. Strings were translated to Swinish, and visual elements such as bitmaps, cursors, and icons were modified to meet the cultural expectations of Swinens. The differences are purely cosmetic, however; the program acts exactly the same for American users and for Swinish users.

Figure 8-1 shows the American version of the program; Figure 8-2 shows the Swinish version. To get the full effect, you need to run both versions—sounds and cursors just don’t translate to the printed page. I designed the TRES.VBP project file to handle either the American or the Swinish version of the program, but I also provide TRESUS.VBP and TRESSW.VBP, hard-coded to the nationalized versions. You can use these to take an initial look at the program.

Figure 8-1. The Test Resources program, localized for the United States of America.

Figure 8-2. The Test Resources program, localized for the Republic of Swinen.