System.Windows.Forms 2.0.0.0 System.Object represents any possible type of element in an HTML document, such as BODY, TABLE, and FORM, among others. The class exposes the most common properties you can expect to find on all elements. Most elements can have child elements: other HTML elements that are placed underneath them. Use the property to test whether a given element has children, and the collection to iterate through them. The property returns the in which the current element is nested. You often need access to attributes, properties, and methods on the underlying element that are not directly exposed by , such as the SRC attribute on an IMG element or the Submit method on a FORM. The and methods enable you to retrieve and alter any attribute or property on a specific element, while provides access to any methods not exposed in the managed Document Object Model (DOM). If your application has unmanaged code permission, you can also access unexposed properties and methods with the attribute. Use the property to test whether an element is of a specific type. Any HTML document can be modified at run time. You can create new objects with the method of , and add them to another element using the or methods. You can also create the elements as HTML tags and assign them to an existing element's property. Represents an HTML element inside of a Web page. Property 2.0.0.0 System.Windows.Forms.HtmlElementCollection To be added. To access only those elements which have the current element as their direct parent, use the collection instead. Elements in this collection will not necessarily be returned in source order. Gets an of all elements underneath the current element. Method 2.0.0.0 System.Windows.Forms.HtmlElement The HTML Document Object Model (DOM) enables you to alter the run-time contents of an HTML file in a number of ways. Use to add new elements to an existing document, or to move an element on the page. If an element has already been parented, appending an element to another element will automatically remove that element from its previous parent. Any additions made to a document at run-time using will not be persisted when you call the method on the control. Adds an element to another element's subtree. The element after it has been added to the tree. The to append to this location in the tree. Method 2.0.0.0 System.Void The Managed Document Object Model (DOM) exposes only a select number of events. Most of the unexposed events are only defined for specific types of elements; such as the submit event, which is valid only on FORM elements. Use to add an event handler to these unexposed events. You should not attach an event to the document or one of its objects until the document has completed loading. The earliest you should call this method is in the event of the control. For more information about the available unmanaged events, see Accessing Unexposed Members on the Managed HTML Document Object Model and the IHTMLElement interfaces: IHTMLElement, IHTMLElement2, IHTMLElement3, IHTMLElement4. Adds an event handler for a named event on the HTML Document Object Model (DOM). The name of the event you want to handle. The managed code that handles the event. Property 2.0.0.0 System.Boolean To be added. Some elements, such as IMG and SCRIPT, cannot have any children. Use this property before you call or on an arbitrary element. Gets a value indicating whether this element can have child elements. Property 2.0.0.0 System.Windows.Forms.HtmlElementCollection To be added. Many of the elements inside of an HTML file can have other HTML elements underneath them. The collection provides a simple mechanism for exploring the tree structure of a document. only exposes elements whose direct parent is the current element. If you have an for a TABLE element, will give you all of the TR (row) elements inside of the TABLE. To retrieve the TD (cell) elements contained inside of the TR elements, you will need to use either the collection on each individual TR element, or use the collection on . Elements in this collection are not guaranteed to be in source order. If is false, Children will always be empty. Gets an of all children of the current element. Event 2.0.0.0 System.Windows.Forms.HtmlElementEventHandler You can cancel the default action for a event on an element by setting the property of the class to true. A event on an element will also occur on that element's parent elements and on the class itself, unless you set the property of the class to true. If the user clicks on an element that does not currently have input focus, the event will occur after the event, but before the event for that element. For more information about the difference between canceling event bubbling and canceling the default action on an event, see About the DHTML Object Model. Occurs when the user clicks on the element with the left mouse button. Property 2.0.0.0 System.Drawing.Rectangle To be added. will return position data only for elements that have been assigned an explicit height and width, or elements that use absolute positioning. A document is absolutely positioned if its position style is set to absolute, after which it can be positioned at any coordinate on the HTML page. Gets the bounds of the client area of the element in the HTML document. Method 2.0.0.0 System.Void To be added. Removes an event handler from a named event on the HTML Document Object Model (DOM). The name of the event you want to handle. The managed code that handles the event. Property 2.0.0.0 System.Windows.Forms.HtmlDocument To be added. Some HTML pages can host frames using the FRAMESET tags. In this case, each individual FRAME element will contain its own instance of . This property is most useful when you have received a reference to an element in an event handler from the , and need to perform some action on the document in which the element resides. Gets the to which this element belongs. Property 2.0.0.0 System.Object To be added. is a wrapper for the Internet Explorer Document Object Model (DOM), which is written using the Component Object Model (COM). If you need to access unexposed properties or methods on the underlying COM interfaces, such as IHTMLElement, you can use this object to query for them. In order to use the unmanaged interfaces, you will need to import the MSHTML library (mshtml.dll) into your application. However, you can also execute unexposed properties and methods using the Invoke method. Gets an unmanaged interface pointer for this element. Event 2.0.0.0 System.Windows.Forms.HtmlElementEventHandler A double-click is determined by the mouse settings of the user's operating system. The user can set the time between clicks of a mouse button that should be considered a double-click rather than two clicks. You can cancel the default action for a event on an element by setting the property of the class to true. A event on an element will also occur on that element's parent elements and on the class itself, unless you set the property of the class to true. For more information about the difference between canceling event bubbling and canceling the default action on an event, see About the DHTML Object Model. Occurs when the user clicks the left mouse button over an element twice, in rapid succession. Event 2.0.0.0 System.Windows.Forms.HtmlElementEventHandler This event occurs when text is dragged to the following locations: Within or between HTML pages hosted in the control or Internet Explorer To another application To the Windows desktop You can cancel the default action for a event on an element by setting the property of the class to true. A event on an element will also occur on that element's parent elements and on the class itself, unless you set the property of the class to true. For more information about the difference between canceling event bubbling and canceling the default action on an event, see About the DHTML Object Model. Occurs when the user drags text to various locations. Event 2.0.0.0 System.Windows.Forms.HtmlElementEventHandler You can cancel the default action for a event on an element by setting the property of the class to true. A event on an element will also occur on that element's parent elements and on the class itself, unless you set the property of the class to true. For more information about the difference between canceling event bubbling and canceling the default action on an event, see About the DHTML Object Model. Occurs when a user finishes a drag operation. Event 2.0.0.0 System.Windows.Forms.HtmlElementEventHandler To be added. Occurs when the user is no longer dragging an item over this element. Event 2.0.0.0 System.Windows.Forms.HtmlElementEventHandler You can cancel the default action for a event on an element by setting the property of the class to true. A event on an element will also occur on that element's parent elements and on the class itself, unless you set the property of the class to true. For more information about the difference between canceling event bubbling and canceling the default action on an event, see About the DHTML Object Model. Occurs when the user drags text over the element. Property 2.0.0.0 System.Boolean To be added. For FORM elements such as text boxes and radio buttons, setting to false will prevent the user from using these form fields. For other elements, such as DIV or SPAN, setting to false will cause all text within the element to appear shaded; however, the text will still be selectable. To cancel selection, add an event handler for the unexposed onselectstart event using the method. Gets or sets whether the user can input data into this element. Method 2.0.0.0 System.Boolean To be added. Tests if the supplied object is equal to the current element. true if is an ; otherwise, false. The object to test for equality. Property 2.0.0.0 System.Windows.Forms.HtmlElement To be added. Use in conjunction with to walk the document tree for an HTML document. Gets the next element below this element in the document tree. Method 2.0.0.0 System.Void Setting the focus on an element both gives that element focus and makes it the active element; for example, the element that has focus will be returned by the property of . Any key strokes entered by a user after has been called will be sent to that element. Puts user input focus on the current element. Event 2.0.0.0 System.Windows.Forms.HtmlElementEventHandler An element that had focus before the user switched to another application using the taskbar or the ALT+TAB keys will receive the and events again when the user switches back to your application. You cannot cancel the default behavior of this event. To remove focus from an element, call on a different element from within the event. A event on an element will also occur on that element's parents and on the class itself, unless you set the property of the class to true. For more information about the difference between canceling event bubbling and canceling the default action on an event, see About the DHTML Object Model. Occurs when the element first receives user input focus. Method 2.0.0.0 System.String An attribute in HTML is any valid name/value pair for that element. exposes only those attributes that are common to all elements, leaving out those that only apply to certain types of elements; SRC is a predefined attribute for the IMG tag, for example, but not for the DIV tag. Use and to manipulate attributes not exposed on the managed Document Object Model (DOM). and are case-insensitive. Retrieves the value of the named attribute on the element. The value of this attribute on the element, as a value. If the specified attribute does not exist on this element, returns an empty string. The name of the attribute. This argument is case-insensitive. Method 2.0.0.0 System.Windows.Forms.HtmlElementCollection To be added. Retrieves a collection of elements represented in HTML by the specified HTML tag. An containing all elements whose HTML tag name is equal to . The name of the tag whose objects you wish to retrieve. Method 2.0.0.0 System.Int32 To be added. To be added. To be added. Event 2.0.0.0 System.Windows.Forms.HtmlElementEventHandler You can neither cancel this event's default behavior, nor prevent it from bubbling. To remove focus from an element, call on a different element from within the event. For more information about the difference between canceling event bubbling and canceling the default action on an event, see About the DHTML Object Model. Occurs when the element has received user input focus. Property 2.0.0.0 System.String To be added. must be unique; you cannot have two elements with the same inside of the same document. Use the property to give the same identifier to a group of logically related elements. Gets or sets a label by which to identify the element. Property 2.0.0.0 System.String To be added. There are several ways to add new elements to an existing HTML page, such as the and methods. Using is often the fastest way to add new content when you have to set many attributes or styles on your new elements. differs from in that will not include the HTML that represents the object you are calling. See for more information about the difference between these two properties. Setting destroys any children previously appended to the element. If you retrieve an element from the DOM and then assign new HTML to its parents' property, your reference to that element will be useless, and its behavior when it calls its properties and methods is undefined. For some elements, setting is not a valid operation. Some HTML tags have no closing tag, such as the IMG tag, and therefore cannot contain nested elements. Some tags, such as the SCRIPT tag, can only contain text content; setting will result in an error. For both types of tags, the property will return false. However, you also cannot set on TABLE and TR elements, as assigning malformed HTML to these elements could corrupt the rendering of the document. Use or the insertRow and insertCell methods on the unmanaged IHTMLTable interface to add rows and cells to a TABLE. If you need only to assign text to an element and not HTML markup, use the property instead. Assigning a value to will destroy any text values previously assigned using . Gets or sets the HTML markup underneath this element. Property 2.0.0.0 System.String To be added. If you attempt to assign HTML to an element with , the HTML code will display as literals in the document, just as if you were viewing HTML within a text file. If you assign HTML to an element using the property, will return all of the text in that HTML with the markup removed. Assigning a value to will destroy any child elements that belong to the element. Gets or sets the text assigned to the element. Method 2.0.0.0 System.Windows.Forms.HtmlElement Do not call this method until after the event on the control has occurred. Calling this method before then can result in an exception, as the document will not have finished loading. Whether a value of is valid will depend on the type of the element. For example, is valid if the element is a DIV, but not if it is a SCRIPT or IMG element, neither of which can contain child elements. Insert a new element into the Document Object Model (DOM). The that was just inserted. If insertion failed, this will return null. Where to insert this element in relation to the current element. The new element to insert. Method 2.0.0.0 System.Object This method can be used to call methods from the Document Object Model (DOM) that do not have equivalents in managed code. Use this version of to execute unexposed methods that take no arguments. For an example, see . Executes an unexposed method on the underlying DOM element of this element. The element returned by this method, represented as an . If this is another HTML element, and you have a reference to the unmanaged MSHTML library added to your project, you can cast it to its appropriate unmanaged interface. The name of the property or method to invoke. Method 2.0.0.0 System.Object System.ParamArray This method can be used to call methods from the Document Object Model (DOM) that do not have equivalents in managed code. All arguments supplied to will be converted to Win32 VARIANT data types before they are passed to the named scripting function. Executes a function defined in the current HTML page by a scripting language. The element returned by the function, represented as an . If this is another HTML element, and you have a reference to the unmanaged MSHTML library added to your project, you can cast it to its appropriate unmanaged interface. The name of the property or method to invoke. A list of parameters to pass. Event 2.0.0.0 System.Windows.Forms.HtmlElementEventHandler occurs before , which in turns occurs before . You can cancel the default action for a event on an element by setting the property of the class to true. A event on an element will also occur on that element's parent elements and on the class itself, unless you set the property of the class to true. For more information about the difference between canceling event bubbling and canceling the default action on an event, see About the DHTML Object Model. Occurs when the user presses a key on the keyboard. Event 2.0.0.0 System.Windows.Forms.HtmlElementEventHandler occurs after and before . You can cancel the default action for a event on an element by setting the property of the class to true. A event on an element will also occur on that element's parent elements and on the class itself, unless you set the property of the class to true. For more information about the difference between canceling event bubbling and canceling the default action on an event, see About the DHTML Object Model. Occurs when the user presses and releases a key on the keyboard. Event 2.0.0.0 System.Windows.Forms.HtmlElementEventHandler occurs after , which occurs after . You cannot cancel this event. A event on an element will also occur on that element's parent elements and on the class itself, unless you set the property of the class to true. For more information about the difference between canceling event bubbling and canceling the default action on an event, see About the DHTML Object Model. Occurs when the user releases a key on the keyboard. Event 2.0.0.0 System.Windows.Forms.HtmlElementEventHandler To be added. Occurs when the element is losing user input focus. Event 2.0.0.0 System.Windows.Forms.HtmlElementEventHandler An element will no longer receive key stroke events after occurs until it is given focus again, either by the user selecting it on the page or by the application calling the method on that element. You cannot cancel this event. An event on an element will also occur on that element's parents and on the class itself, unless you set the property of the class to true. For more information about the difference between canceling event bubbling and canceling the default action on an event, see About the DHTML Object Model. Occurs when the element has lost user input focus. Event 2.0.0.0 System.Windows.Forms.HtmlElementEventHandler You can cancel the default action for a event on an element by setting the property of the class to true. A event on an element will also occur on that element's parent elements and on the class itself, unless you set the property of the class to true. For more information about the difference between canceling event bubbling and canceling the default action on an event, see About the DHTML Object Model. Occurs when the user presses a mouse button. Event 2.0.0.0 System.Windows.Forms.HtmlElementEventHandler To be added. Occurs when the user first moves the mouse cursor over the current element. Event 2.0.0.0 System.Windows.Forms.HtmlElementEventHandler To be added. Occurs when the user moves the mouse cursor off of the current element. Event 2.0.0.0 System.Windows.Forms.HtmlElementEventHandler You cannot cancel this event. A event on an element will also occur on that element's parent elements and on the class itself, unless you set the property of the class to true. For more information about the difference between canceling event bubbling and canceling the default action on an event, see About the DHTML Object Model. Occurs when the user moves the mouse cursor across the element. Event 2.0.0.0 System.Windows.Forms.HtmlElementEventHandler You can cancel the default action for a event on an element by setting the property of the class to true. A event on an element will also occur on that element's parent elements and on the class itself, unless you set the property of the class to true. For more information about the difference between canceling event bubbling and canceling the default action on an event, see About the DHTML Object Model. Occurs when the mouse cursor enters the bounds of the element. Event 2.0.0.0 System.Windows.Forms.HtmlElementEventHandler You can cancel the default action for a event on an element by setting the property of the class to true. A event on an element will also occur on that element's parent elements and on the class itself, unless you set the property of the class to true. For more information about the difference between canceling event bubbling and canceling the default action on an event, see About the DHTML Object Model. Occurs when the user releases a mouse button. Property 2.0.0.0 System.String To be added. Use the property to retrieve elements from a document using the method on the property of . When applied to INPUT elements, defines the variable name for that element's data when its form is submitted to the server. Gets or sets the name of the element. Property 2.0.0.0 System.Windows.Forms.HtmlElement To be added. Use in conjunction with to walk the document tree for an HTML element. Gets the next element at the same level as this element in the document tree. Property 2.0.0.0 System.Windows.Forms.HtmlElement To be added. Elements can be positioned on an HTML page in one of three ways: default flow positioning; relative positioning, in which the element is offset by a fixed amount relative to its parent; and absolute positioning, in which the element is given a fixed coordinate position relative to the upper-left corner of the document. When a document's elements use relative or absolute positioning, you can use OffsetParent to calculate an element's coordinate position in the client area. For more information about element positioning in HTML, see About Element Positioning. Gets the element from which is calculated. Property 2.0.0.0 System.Drawing.Rectangle To be added. Elements can be positioned on an HTML page in one of three ways: Default flow positioning. Relative positioning, in which the element is offset by a fixed amount relative to its parent. Absolute positioning, in which the element is given a fixed coordinate position relative to the upper-left corner of the document. For more information about element positioning in HTML, see About Element Positioning. Gets the location of an element relative to its parent. Method 2.0.0.0 System.Boolean The equality operator tests the IUnknown pointers of the underlying COM objects wrapped by the supplied classes. Compares two elements for equality. true if both parameters are null, or if both elements have the same underlying COM interface; otherwise, false. The first . The second . Method 2.0.0.0 System.Boolean To be added. Compares two objects for inequality. true is only one element is null, or the two objects are not equal; otherwise, false. The first . The second . Property 2.0.0.0 System.String To be added. Whereas will return all HTML contained in the current element excluding the current element's surrounding tags, includes the current element's tag as well as the HTML that tag contains, for example: <HTML> <BODY> <DIV id="div1"> Hello <DIV id="div2"> World <DIV id="div3"> How are you? </DIV> </DIV> </DIV> </BODY> </HTML> In this example, calling on div2 will return: <DIV id="div2"> World <DIV id="div3"> How are you? </DIV> </DIV> Calling will return: World <DIV id="div3"> How are you? </DIV> If you assign a new value to , the current element reference will become invalid; it will not reflect the name, properties and child content of the HTML you have just assigned. Gets or sets the current element's HTML code. Property 2.0.0.0 System.String To be added. If you attempt to assign HTML to an element with , the HTML code will display as literals in the document, just as if you were viewing HTML within a text file. If you assign HTML to an element using the property, will return all of the text in that HTML with the markup removed. Assigning a value to will destroy any child elements that belong to the element. Gets or sets the current element's text. Property 2.0.0.0 System.Windows.Forms.HtmlElement To be added. The property enables discovery of an element's context. It is most useful inside of event handlers such as , which can fire for any element anywhere in the document's object hierarchy. The property of the HTML element (the top of an HTML document) points back to itself. If you call inside a loop, verify that the loop's break condition compares the type of the current element and the type of the Parent property, or else your code may execute an infinite loop. Gets the current element's parent element. Method 2.0.0.0 System.Void This method is used to access HTML Document Object Model (DOM) events. It directly calls the IHTMLElement3::fireEvent method. For more information about how to use the DOM through the class, see Accessing Unexposed Members on the Managed HTML Document Object Model. Causes the named event to call all registered event handlers. The name of the event to raise. Method 2.0.0.0 System.Void Calling this method raises the event for the element. When focus is cleared from an element using this method, it is given to the document containing the element, not to the next element in the tab order. Removes focus from the current element, if that element has focus. Method 2.0.0.0 System.Void To be added. Scrolls through the document containing this element until the top or bottom edge of this element is aligned with the document's window. If true, the top of the object will be displayed at the top of the window. If false, the bottom of the object will be displayed at the bottom of the window. Property 2.0.0.0 System.Int32 To be added. The full dimensions of the scroll area are available using ; ScrollLeft and are exposed independently because these are the only two properties of the scroll area that developers can set. Gets or sets the distance between the edge of the element and the left edge of its content. Property 2.0.0.0 System.Drawing.Rectangle To be added. An element will have a scrollable region if its content exceeds the size of its dimensions, unless the overflow style on the element forbids rendering scrollbars. You cannot modify the size of the scroll area directly, but you can modify the distance between the edges of the scroll area and the edges of the element. Use the and properties to achieve this. Gets the dimensions of an element's scrollable region. Property 2.0.0.0 System.Int32 To be added. The full dimensions of the scroll area are available using ; and ScrollTop are exposed independently because these are the only two properties of the scroll area that developers can set. Gets or sets the distance between the edge of the element and the top edge of its content. Method 2.0.0.0 System.Void An attribute in HTML is any valid name-value pair for that element. exposes only those attributes that are common to all elements, leaving out those that only apply to certain types of elements; SRC is a predefined attribute for the IMG tag, for example, but not for the DIV tag. Use and to manipulate attributes not exposed on the managed Document Object Model (DOM). If is not a defined attribute on an element, will define it on the element as a new attribute. and are case-insensitive. To set the class attribute on an , you must refer to the attribute as className when specifying the first argument to Sets the value of the named attribute on the element. The name of the attribute to set. The new value of this attribute. Property 2.0.0.0 System.String To be added. The HTML Document Object Model (DOM) uses styles as defined in the World Wide Web Consortiums Cascading Style Sheets specification to control the display of an element. Styles in the property take the form of colon-delimited name-value pairs, with each pair separated by a semicolon, as follows: style-name1:value1;...;[style-nameN:valueN;] To set the font for a DIV element to 14-point Times New Roman bold, for example, you would assign the following string: font-face:Times New Roman;font-size:14px;font-weight:bold; For a full list of all available styles in the HTML DOM, see STYLE Attribute. Gets or sets a comma-delimited list of styles for the current element. Property 2.0.0.0 System.Int16 To be added. determines which element in an HTML document will next receive focus when the user presses the TAB key. By default, the only elements included in the tab order are INPUT elements, the SELECT control, and any element whose contentEditable property is set to true. You can include any HTML element in the tab order, such as a DIV, by assigning it an explicit . Valid values for range from -32767 to 32767. Gets or sets the location of this element in the tab order. Property 2.0.0.0 System.String To be added. Many elements in the HTML Document Object Model have attributes, properties, and methods that are unique to those elements; such as the HREF attribute on the A element, or the Submit method on FORM. Use when you have an element of a potentially arbitrary type, and need to perform a type-specific operation. Gets the name of the HTML tag.