ondblclick Event

Microsoft FrontPage Visual Basic

Show All Show All

ondblclick Event

Occurs when a user double-clicks on an element within a page in Design view in Microsoft FrontPage.

expression.ondblclick

expression    Required. An expression that returns one of the objects in the Applies To list, which has been declared using the WithEvents keyword in a class module.

Example

The following example changes the background color of the source element when the user double-clicks in the document. This example must be placed in a class module, and it assumes that you have declared in the General Declarations section of a class module an FPHTMLDocument object variable called "objDoc" using the WithEvents keyword.

    Private Function objDoc_ondblclick() As Boolean
    Dim objElement As IHTMLElement
    Dim objEvent As IHTMLEventObj
    
    Set objEvent = objDoc.parentWindow.event
    Set objElement = objEvent.srcElement

    objElement.Style.backgroundColor = "yellow"
End Function