FPHTMLAreaElement Object


Represents an AREA element. AREA elements are contained within MAP elements in an HTML document. Use the FPHTMLAreaElement object to specify the coordinates and shape of an AREA element as well as other attributes of an AREA element. See also the IHTMLAreaElement object.
Using the FPHTMLAreaElement object
Use the areas property of an FPHTMLMapElement or IHTMLMapElement object to return the IHTMLAreasCollection object of a MAP element. Use the Item method to return an FPHTMLAreaElement object. The following example returns a string array containing the values of the href property, which is equivalent to a hyperlink, for all the FPHTMLAreaElement objects in the specified FPHTMLMapElement object.
Function GetAreaHREF(objMap As FPHTMLMapElement) As String()
Dim objArea As FPHTMLAreaElement
Dim strAreas() As String
Dim intCount As Integer
ReDim strAreas(objMap.areas.Length - 1)
For intCount = 0 To objMap.areas.Length - 1
Set objArea = objMap.areas.Item(intCount)
strAreas(intCount) = objArea.href
Next
GetAreaHREF = strAreas
End Function
Use the href, Shape , and coords properties to specify the appearance and behavior of an AREA element. The following example takes arguments that specify the shape, hyperlink behavior, and coordinates of the specified FPHTMLAreaElement object.
Sub SetArea(objArea As FPHTMLAreaElement, iX1 As Integer, _
iY1 As Integer, iX2 As Integer, iY2 As Integer, _
strHREF As String, strShape As String)
Dim strCoords As String
strCoords = iX1 & "," & iY1 & "," & iX2 & "," & iY2
With objArea
.href = strHREF
.Shape = strShape
.coords = strCoords
End With
End Sub