• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 217
  • Last Modified:

Show hyperlink URL in status bar

Sample code to show a hyperlink's url or title in a status bar from webBrowser control.

Thanks
0
kmartin7
Asked:
kmartin7
  • 2
1 Solution
 
Ryan ChongCommented:
Hi kmartin7,

Sometimes that may useful:

Receive Events from and Send Events to Open IE Windows (by Ark)
http://www.freevbcode.com/ShowCode.Asp?ID=1606
0
 
Richie_SimonettiIT OperationsCommented:
'set a reference to microsoft HTML object library

'declare a variable:
Private WithEvents hDoc As HTMLDocument

'on this event:
Private Sub WB1_DocumentComplete(ByVal pDisp As Object, URL As Variant)
If (pDisp Is WB1.object) Then
    Set hDoc = WB1.Document
end if
end sub

'and in this event
Private Sub hDoc_onmousemove()
If hDoc.parentWindow.event.srcElement.tagName = "A" Then
    Me.Caption = hDoc.parentWindow.event.srcElement.href
End If
End Sub
0
 
Richie_SimonettiIT OperationsCommented:
Thanks for "A" grade!
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now