Share via


Visual Basic Concepts

The Dynamic HTML Object Model in Visual Basic

Using the Dynamic HTML object model, you can access and manipulate anything within your application's HTML pages. The HTML elements in a page are available as individual objects, meaning you can examine and modify elements and their attributes by reading and setting properties and by calling methods. The text in elements is available through the elements' properties and methods.

The object model also makes user actions, such as pressing a key and clicking the mouse, available as events. You can intercept and process these and other events by creating event procedures in your Visual Basic code.

The following figure shows the major objects in the Dynamic HTML object model.

Dynamic HTML object model

Note   The BaseWindow object used by Visual Basic in the picture above corresponds to the topmost Window object in the Dynamic HTML object model.

The two main objects in the object model, for the purposes of Visual Basic, are the BaseWindow object and the Document object.

  • The BaseWindow object represents an instance of the browser and is used to display the Document object.

  • The Document object represents the HTML page you view in the browser. You use events in the Document object to access the object model and handle user actions in the browser.