Launching an HTML Editor from the Page Designer

If you have saved your HTML page to an external file, you can launch an HTML editor from within Visual Basic and view your page within it. You might do this if you want to fine-tune the appearance of your page, or if you want to work in the HTML source code. When you launch an external editor from Visual Basic, Visual Basic saves your current project and any changes you have made to the page, then opens the page in the default HTML editor for your system. If you do not have an HTML editor installed, the system opens Notepad and displays the HTML source.

Note   You can set the default editor that Visual Basic will open on the Advanced panel of the Options dialog box.

You can launch an external editor for only those files that were saved to a location on your hard drive, rather than stored within the designer. If you want to edit a file you initially stored within the designer, you must specify a save location for it by filling in the SourceFile property for the page.

Note   If you specify a different source file after one has already been set, Visual Basic prompts you to save your current HTML page before switching to the newly specified file. This will save your changes to the old file name before opening the new file.

Any changes you make to the page in an external editor appear in Visual Basic as soon as you save in the editor. However, changes you make in Visual Basic may not automatically be updated in the editor, depending on the editor you choose to use. Be careful to avoid conflicts when you have an HTML page open in both Visual Basic and another program. In general, it is best to make changes to the document in only one location at a time. The steps for editing a document should be:

  1. Launch the editor from Visual Basic.

  2. Edit your HTML.

  3. Save your changes and close the editor.

  4. Choose "Yes" at the prompt in Visual Basic asking if you want to refresh the page.

Note   In addition to watching for changes when you launch an external editor, Visual Basic watches for changes to the page's source file any time you have the page open in Visual Basic. If the source file changes, a prompt appears that asks if you want to reload your page.

To edit your HTML page outside of Visual Basic