Beginning Your DHTML Application Project

See Also

When you begin a DHTML application, you select a special type of project called a DHTML Application project. A DHTML Application project is an ActiveX DLL project that automatically sets the correct references you need to access the designer for your HTML pages and the appropriate toolbox tab and controls.

Visual Basic automatically inserts a designer into the project and displays it on the screen when you open this project type. The designer corresponds to a single HTML page and acts as the base on which you create its user interface. If you want to include more than one HTML page in your application, you can insert additional designers into your project.

The application you create runs as an in-process component in the Web browser or Web browser control. For more information on in-process components, see the "In-Process and Out-of-Process Components" section in the Component Tools Guide.

To begin your DHTML application

  1. Start a new project and select DHTML Application as your project type.

  2. In the Project Explorer window, open the Designers folder, then double-click on DHTMLPage1 to display it in the main window.

To add additional DHTML pages to your project

  1. On the Project menu, click Add DHTML Page and Visual Basic adds a new page designer to your project.

    Note   The first four kinds of ActiveX designers loaded for a project are listed on the Project menu. If more than four designers are loaded, the later ones will be available from the More ActiveX Designers submenu on the Project menu.

  2. In the DHTMLPage Properties dialog box, choose how you want to save your HTML pages, then click OK.

Save Options for Pages and Designers

When you add pages to the project, you must make decisions about how your page will be saved and whether you will create a new page or edit an existing HTML page from your hard drive. There are two ways you can save your page:

The SourceFile property for the designer reflects the save method you choose. When you save within the designer, the SourceFile property is blank. When you specify an external file, the SourceFile property reflects the full path to the file you selected.

The save options you choose apply only until the project is built. At that time, the system generates external HTML files for the pages in your project and stores them in the location you specify.

Specifying save options for a page

To access the DHTMLPage Properties dialog box

To save your HTML page within the designer files until the project is built

To create a new page and save it to a location on your computer

  1. Click Save HTML in an external file in the .DHTMLPage Properties dialog box.

  2. Click New, enter a file name for your page, and click OK.

To import an existing page and save it to a location on your computer

  1. Click Save HTML in an external file in the .DHTMLPage Properties dialog box.

  2. Click Open, choose the file you want to edit, and click OK.

To import an existing page but save it within the designer

  1. Click Save HTML in an external file in the .DHTMLPage Properties dialog box.

  2. Click New, choose the file you want to import, and click OK.

  3. Click Apply to import the page.

  4. Click Save HTML within the designer.

  5. Click OK to return to the page designer.

    Visual Basic sets the value of the SourceFile property to reflect the choices you made.

Note   You can edit the SourceFile property directly to make the same choices. Enter a path and file name in the Properties window to import a file or save to an external file, or clear the contents of the SourceFile property to save the page within the designer.