Visual Basic Concepts

Building Your DHTML Application

DHTML applications are compiled the same way any Visual Basic project is compiled — by choosing Make from the File menu. A DHTML application must be built as an in-process component, or a DLL file.

Project Files in DHTML Applications

Like standard Visual Basic projects, DHTML application projects have code modules and visual designers — in this case, the DHTML Page designer. Visual Basic creates a page designer for each HTML page in your application. For each page designer, Visual Basic stores the following:

  • A .dsr file. .Dsr files are plain text files that contain the source code for the designer and references to the HTML pages they contain.

  • A generated .dsx file that contains binary information about the designer.

  • The HTML pages associated with an application are saved to the location you specify.

Any files associated with the HTML pages are also a part of your project, in that they must be deployed with the project. For example, if your HTML page references a series of images, the image files themselves must be deployed with the project. See "Deploying Your DHTML Application" later in this chapter for more information.

Tip   If you are checking your DHTML application into Microsoft® Visual SourceSafe®, you should manually check in the project's .htm files. These files are not automatically checked into the SourceSafe directory with the rest of the project files. This does not apply if your HTML pages were saved as part of the designer, rather than as external .htm files.

Compiled Files in DHTML Applications

When you compile a DHTML application, Visual Basic creates a DLL containing the page designer and its code. The HTML pages and their associated files are stored separately from the DLL and must be deployed with it.

During compile, Visual Basic creates several additional files. These include your project file, a .vbw file that contains layout information on your project, an .exp file, and a library file.

To build your DHTML application

  1. If the project is still in run mode, click the End button to return to design mode.

  2. Set the BuildFile property to the full path and file name to which you want to build the project.

    Note   By default, the BuildFile property is set to the value of the SourceFile property. If you change this value, you must specify both a directory and a drive location.

  3. On the File menu, click Make Project.dll to open the Make Project dialog box. Click OK to make the DLL file.