Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 248
  • Last Modified:

LocationURL of webBrowser control

Is there a way to store information from LocationURL to use as History?

Thanks,

Kurt
0
kmartin7
Asked:
kmartin7
  • 4
  • 2
  • 2
  • +1
1 Solution
 
devthaCommented:
save the url into a text file opened for append. The file can be named as URLHistory.log and saved in the app.path folder.
0
 
wsh2Commented:
Yes.. <smile>
0
 
kmartin7Author Commented:
Okay, for the 250 points, how about some sample code? I am not very VB literate as of yet.

Kurt
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
Richie_SimonettiIT OperationsCommented:
hearing...
0
 
Richie_SimonettiIT OperationsCommented:
Option Explicit
Private Declare Function WritePrivateProfileString Lib "kernel32" Alias "WritePrivateProfileStringA" (ByVal lpApplicationName As String, ByVal lpKeyName As Any, ByVal lpString As Any, ByVal lpFileName As String) As Long

Private Sub Form_Load()
WebBrowser1.Navigate "www.microsoft.com"
End Sub


Private Sub WebBrowser1_DocumentComplete(ByVal pDisp As Object, URL As Variant)
Static Counter As Integer
If (pDisp Is WebBrowser1.Object) Then
    Dim ret As Long
    ret = WritePrivateProfileString("History", "url" & Counter, CStr(WebBrowser1.LocationURL), "c:\History.log")
    If ret = 0 Then
        MsgBox "an error ocurred while saveing url"
    End If
    Counter = Counter + 1
End If
End Sub
0
 
Richie_SimonettiIT OperationsCommented:
Thanks!
0
 
devthaCommented:
that was my solution you should have waited for me to give you the code. Well ...
0
 
kmartin7Author Commented:
Let's see your code...
0
 
Richie_SimonettiIT OperationsCommented:
pardon... your code?
I did that code all the time, see my profile.
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

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