DOCUMENT:Q190249 11-JAN-2001 [vbwin] TITLE :INFO: VB 6.0 Readme Part 9: DHTML Page Designer Issues PRODUCT :Microsoft Visual Basic for Windows PROD/VER:WINDOWS:6.0 OPER/SYS: KEYWORDS:kbhtml kbActiveX kbDHTML kbInternet kbPageDesigner kbVBp kbVBp600 ====================================================================== ------------------------------------------------------------------------------- The information in this article applies to: - Microsoft Visual Basic Learning Edition for Windows, version 6.0 - Microsoft Visual Basic Professional Edition for Windows, version 6.0 - Microsoft Visual Basic Enterprise Edition for Windows, version 6.0 ------------------------------------------------------------------------------- SUMMARY ======= The information below includes the documentation and workarounds for Visual Basic 6.0. This information can also be found in the README.htm file that ships with Visual Basic 6.0 on the Visual Basic 6.0 CD-ROM. Please see the REFERENCES section of this article for a list of the Microsoft Knowledge Base articles relating to the Visual Basic 6.0 readme. Following is a list of all parts of the readme file: Part 1. Important Issues - Please Read First! Part 2. Data Access Issues and DataBinding Tips Part 3. Control Issues Part 4. Language Issues Part 5. Samples Issues Part 6. Wizard Issues Part 7. Error Message Issues Part 8. WebClass Designer Issues Part 9. DHTML Page Designer Issues Part 10. Extensibility issues Part 11. Miscellaneous Issues Part 12. Microsoft Transaction Server (MTS) Issues Part 13. Dictionary Object Part 14. Visual Component Manager Part 15. Application Performance Manager MORE INFORMATION ================ DHTML Page Designer Issues -------------------------- Page Designer Error Messages ---------------------------- There are currently no Help topics for the following error messages: - "Save internal HTML to File?" This occurs if you specify a new, existing HTML file in the Property Page. If you have HTML code in an instance of the Page Designer and you decide to use a different, existing HTML file with the designer, you must open the property page and specify the name of the existing file. The Page Designer must then know what to do with the internal HTML that is currently in the designer. If you answer Yes to this question, Visual Basic will save the HTML to a file after you specify a filename. - "DHTML Page Designers cannot be private" This occurs if you attempt to change a DHTML Page Designer's Public property to False. While ActiveX designers can be either public or private, they must be Public to be accessible in a DHTML application. Private designers can be useful in certain cases, such as in the Data Environment when you want to encapsulate your data access logic in the Data Environment, but not make it public. - "Reload changed HTML file?" This occurs if the Page Designer notices that the HTML file referenced by the designer has changed on disk. This message confirms whether you want to load the modified HTML back into the designer. Page Designer: "Me." Not Supported ---------------------------------- You cannot use the "Me" reference in your page designer code to reference the DHTMLPage object. For example, the documentation frequently shows that you can write code such as "Me.Document.item". This is not supported. Instead of using Me, you must use the "DHTMLPage" statement. For example, instead of Me.Document, you would use DHTMLPage.Document. If the designer is private, "Me" can be used, but private is not allowed in DHTML pages. Page Designer: Cannot Access HTML Elements from Forms or External Objects ------------------------------------------------------------------------- You cannot write code in a form, message box, or other object that references HTML elements on the page. Page elements are only accessible within the page itself. Page Designer: Image SourceFiles are Resolved Incorrectly --------------------------------------------------------- Often, as you work in the page designer, you will want to reference an image that is located in the same directory as your current HTML page. Normally, when you reference such an image, you do not include a path in the image element's SRC attribute. The lack of a path tells the browser to pull the image from the page's current directory. For example, you might enter "myimage.gif" in the SRC property for an image of this type, rather than specifying "c:\mydhtml\myimage.gif." This is called a relative path, because it does not specify the full location of the image file. At design-time, the page designer does not correctly display these images with relative paths. When you enter such a property value in the SRC property or display a page that contains such a reference, two things will happen: - The image element will appear empty at design time. - The page designer appends the word "About:" to the value of your SRC property. For example, you might see "About:myimage.gif." Despite these problems, the image appears correctly when you run the project. So you can ignore the "About:" keyword that appears in the SRC property and the fact that the image doesn't appear in the designer. When you save the HTML file, the image tag will be written correctly. Page Designer: Binary Persistence Issue: Some controls attempt to save some or all of their properties in a binary format that cannot be directly represented in HTML. Because of this situation, some control properties may not be saved after you run your project. In order to correct this problem, set the property at run-time. The following list shows the known properties for which this problem occurs: Tabbed Dialog Control: TabsPerRow property does not persist Windowless Controls Listbox: List items do not persist Common Controls: Tabstrip settings do not persist Common Controls: Toolbar settings do not persist Common Controls: StatusBar settings do not persist ADODC Control: ConnectionString property does not persist In addition, for many controls, font properties do not persist. This occurrence is the most common manifestation of the binary persistence problem. Page Designer: Type Library Problems are Preventing Some Help Topics from Appearing -------------------------------------------------------------------- When you begin a page designer project, you will see two DHTML type libraries in the Object Browser, the DHTMLPAGELIB library, and a DHTMLProject library. Help is enabled for the DHTMLPAGELIB library, but not for the DHTMLProject library. Most elements in DHTMLProject should be available within the other library. In other cases, type library problems are preventing certain pieces of the help to appear or function correctly. This happens in the following cases: - When you try to access help from the Properties window for an ActiveX control's properties. - When you try to access help from the Code Editor window, for the Document property. In most cases, you should be able to locate the topic you want through the index in the MSDN Help viewer. Page Designer: Modal Prompts Appear Behind Browser in Run Mode -------------------------------------------------------------- If you add a message box to your DHTML page, the message box appears behind Internet Explorer when activated in run mode. In addition, you cannot move Internet Explorer out of the way in order to view the message, because the message is modal. When you hear the beep that indicates a message is on the screen, select the Visual Basic application from your taskbar to view and clear the message. Page Designer: Do Not Watch Objects of Type HTMLDocument -------------------------------------------------------- Expanding a watch on objects of type HTMLDocument may cause problems within the IDE. Avoid watching objects of this type. Page Designer: Cannot Design Frames Within A Page Designer ---------------------------------------------------------- When you create Web pages in the DHTML Page Designer, you cannot insert framesets within the page and fill their contents. You can, however, display the pages you create for your DHTML application within a frameset created outside of Visual Basic. If you want to design and debug frames, the process is as follows: 1. In Visual Basic, design the contents of each frame with an individual DHTML Page Designer. 2. In an external editing program, design the frameset document as a separate .htm file and save it in the temp directory. Set the SRC attributes for each frame to point to your content pages, using the names you defined in their BuildFile properties. 3. In Visual Basic, choose "Start Browser with URL" on the Debugging tab of the Project Properties dialog box and enter the path of the frameset file. 4. Enter run mode. Visual Basic launches Internet Explorer and loads the frameset page you designed in an external program. The frameset document should then load your page designer pages in the appropriate frames. 5. Debug your application as usual. Page Designer: Cannot use Visual Basic Code with the SetInterval Method ----------------------------------------------------------------------- If you use the SetInterval method of the Internet Explorer BaseWindow object on a timer within your DHTML applications, you must set the first parameter of the method to point to a Javascript or VBScript time routine contained within the HTML page. This method cannot reference a Visual Basic routine within your page designer code. Page Designer: Control Issues ----------------------------- The following are items to be aware of as you work with ActiveX Controls in your DHTML applications: - You must use the compiled version of any ActiveX controls you add to your DHTML pages. - You cannot use a DHTML page within an ActiveX Control project in this release. The reverse is also true -- that is, the ActiveX control project cannot be part of the project group in which you are working. The safest and most reliable way to build and debug a user control is to compile the user control project, then close that project, add the control to the page designer, and proceed from there. Interactive debugging and design between the two projects is not possible at this point. - When you embed an ActiveX control on a page in your DHTML application, not all of the appropriate type library information is copied with it. This can cause errors when you try to access a link in the object browser to the information for that control, and it can prevent you from accessing extended properties and methods for the control in the statement completion window that appears when you write code. - Some ActiveX controls will not work correctly with the page designer. You cannot use the following controls in a DHTML page: MS Chart, Script Debugger, Hierarchical FlexGrid, SrcEdit OC, LayoutDTC, Tabular Data control, PageNavbarDTC, DBGrid(use DataGrid that ships with VB6) or IE Popup Window. In addition, you cannot use private or uncompiled user controls on pages in your DHTML applications. In addition, it is possible that some controls you have obtained from third parties may not work correctly with the page designer. Most controls that work with Internet Explorer 4 should work with the page designer. If you buy a third-party control that does not work with the page designer, test it within Internet Explorer and then contact the control vendor. For information on how to build ActiveX controls that work with the page designer and Internet Explorer, please see the article "Building ActiveX Controls for Internet Explorer 4.0," available in your MSDN library or on Microsoft's Web site in the MSDN Online section. - If you have an ActiveX control for which you have set the background transparent, it will appear opaque at design time when added to your DHTML application. - If your DHTML page contains a Listview control and you try to access the ColHeader.Width property, you will encounter an error saying that the object does not support this property. The property does appear on the Auto List Members drop-down list, but you should not use it in your code. - Some Visual Basic controls, such as the common dialog or the sysinfo control, are invisible at run-time. If you add one of these objects to your HTML page, you cannot select it and move it around within the page after you initially draw it. You can, however, select the control in the treeview and either delete it or access its properties. - If you add a File Upload control (FlUpl) to your DHTML designer and you click it during design-time, it will activate and display the standard file chooser dialog box. You can cancel this dialog box and move on. - There is a nonfunctional InnerText property available in the Auto List Members drop-down list for the horizontal rule element. Do not set a value for this property as it will produce no result. - When you add an ActiveX control to your page, the Height and Width properties do not update automatically as the control is resized in the designer. To refresh the numbers in the height and width properties, click in a blank area of the treeview after resizing your control. - When you click a control in the toolbox and then move the cursor to the Design pane of the designer, the cursor does not change from an I-beam to a pointer to indicate that you can click and draw your control. You can still click and drag your control to the desired shape, even though the cursor is still an I-beam. - When you copy controls between two DHTML projects in the same project group, the Components dialog box is not updated. You will need to set the necessary references to that control manually. - If you use the ImageList control, its picture will not be loaded if the project is Run in debug mode. However, the image will work correctly when you run the compiled DLL. Page Designer: Miscellaneous HTML Issues ---------------------------------------- The following are items to be aware of as you create and work with HTML in the DHTML page designer: - If your page contains a CHARSET metatag, this tag will be stripped out when the page is read into the designer. This should not cause a problem in most pages. - The column widths you see in tables within the designer may not match the column widths you see when you run your page in the browser. You may be able to avoid this problem either by setting your column widths in percentages rather than pixels, or by making sure the left-most column does not have a width measurement set for it. - Do not assign ID property values with greater than 117 characters. If you do, you may receive an error when running your application. - If the first paragraph element on your page does not contain text and is followed by another HTML element, you may see unexpected results if you delete the first
tag. In this case, other elements on the page may also be deleted. - You may receive inconsistent results when trying to delete a DIV tag using the designer's treeview panel. If you have trouble deleting a DIV tag, use the Launch Editor function and remove the