IHTMLEventObj Object

Multiple objects
IHTMLEventObj
IHTMLElement

Represents an user action that occurs because on a document, window, or element within a document.

Using the IHTMLEventObj object

Use the event property of the FPHTMLWindow2 object to return an IHTMLEventObj object.

The following example creates an IHTMLEventObj object within the onclick event for the active document window which causes Microsoft FrontPage to display the number of times the mouse button has been clicked when a user clicks on the document.

Private WithEvents objDoc As FPHTMLDocument
Public objWindow As FPHTMLWindow2

Private Sub Class_Initialize()

    Set objWindow = ActiveDocument.parentWindow
    Set objDoc = ActiveDocument

End Sub

Private Function objDoc_onclick() As Boolean

    Dim objEvent As IHTMLEventObj
    
    Set objEvent = objWindow.event
    
    MsgBox objEvent.Button
    
End Function

Place the above code in a class module named "Class1." Then place the following code in a regular code module and run it to activate the class module and the resulting events.

Dim objFPEvent As Class1

Sub startevent()

    Set objFPEvent = New Class1

End Sub

Properties | altKey Property | button Property | cancelBubble Property | clientX Property | clientY Property | ctrlKey Property | fromElement Property | keyCode Property | offsetX Property | offsetY Property | qualifier Property | reason Property | returnValue Property | screenX Property | screenY Property | shiftKey Property | srcElement Property | srcFilter Property | toElement Property | Type Property | x Property | y Property

Parent Objects | FPHTMLWindow2 Object | FPHTMLWindowProxy Object | IHTMLWindow2 Object

Child Objects | IHTMLElement Object