How to Run AVI Files for VB6

How to Run AVI Files for VB6

Visual Basic 6, or VB6, is a relatively easy-to-learn programming language and integrated development environment, or IDE. It was developed by Microsoft, and although it is not supported by Microsoft anymore, many people still use it to develop graphical user interfaces and ActiveX controls and objects. If you want to run an audio video interleave, or AVI, file for VB6, you are probably looking for the easiest method. Using resource files is not only fast and straightforward, it is also secure. Once an AVI is stored in a resource file, the user can no longer interact with it.

Instructions

    1

    Go to your VB CD-ROM installation disk and find the "Tools" folder. You need to get a tool from there.

    2

    Find "RC.EXE" and copy it somewhere on your hard disk drive. This tool compiles text files into resource files.

    3

    Create a new file on your hard disk by using a text editor. Give it a name and change its extension to ".rc."

    4

    Describe the files you want to include in your resource file. To do this, edit the file you have just created and add a "nameID keyword path" line for every resource. The "nameID" is the name by which you will refer to this item. The keyword is "VIDEO" for AVI files, and "path" is the path to the file. Here is an example:

    MovieIntro VIDEO C:\AVIS\movie0.avi

    5

    Save the file and run RC.EXE on it by using the "RC /r FILENAME.RC" command in the command prompt. Replace "FILENAME" with the name of your file. The RC.EXE tool will create a resource file called "FILENAME.RES."

    6

    Insert the resource in your VB6 project by pressing "CTRL+D" and locating the file. You should be able to use the resources contained in that file, specifically the AVI files.

    7

    Use the "LoadResData" function in VB6 to use the AVI files from the resource.

Blog Archive