Creating a Web Browser
There are two properties and one main event that will help you build Internet-aware applications with the WebBrowser control:
Location Name
When you're at a site, you can retrieve the title as would typically appear in the Internet Explorer title bar caption by retrieving the LocationName property. Here's an example:
MsgBox WebBrowser1.LocationName
Location URL
You can retrieve the current Web address by grabbing the LocationURL property, as would typically appear in the Internet Explorer Address bar. Here's an example:
MsgBox WebBrowser1.LocationURL
Document Complete
The DocumentComplete event of the WebBrowser control fires up when any Web page has finished loading. This is the ideal event under which to write code to update possible title and address bars. Here's an example:
Private Sub WebBrowser1_DocumentComplete(ByVal pDisp As _
Object, URL As Variant)
Me.Caption = WebBrowser1.LocationName
txtWebAddress.Text = WebBrowser1.LocationURL
End Sub
0 Comments (click to add your comment)
Networking Solutions



Solid state disks (SSDs) made a splash in consumer technology, and now the technology has its eyes on the enterprise storage market. Download this eBook to see what SSDs can do for your infrastructure and review the pros and cons of this potentially game-changing storage technology.