Solved

LocationURL of webBrowser control

Posted on 2001-08-20
9
195 Views
Last Modified: 2010-08-05
Is there a way to store information from LocationURL to use as History?

Thanks,

Kurt
0
Comment
Question by:kmartin7
  • 4
  • 2
  • 2
  • +1
9 Comments
 
LVL 6

Expert Comment

by:devtha
Comment Utility
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
 
LVL 14

Expert Comment

by:wsh2
Comment Utility
Yes.. <smile>
0
 
LVL 11

Author Comment

by:kmartin7
Comment Utility
Okay, for the 250 points, how about some sample code? I am not very VB literate as of yet.

Kurt
0
 
LVL 16

Expert Comment

by:Richie_Simonetti
Comment Utility
hearing...
0
What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

 
LVL 16

Accepted Solution

by:
Richie_Simonetti earned 250 total points
Comment Utility
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
 
LVL 16

Expert Comment

by:Richie_Simonetti
Comment Utility
Thanks!
0
 
LVL 6

Expert Comment

by:devtha
Comment Utility
that was my solution you should have waited for me to give you the code. Well ...
0
 
LVL 11

Author Comment

by:kmartin7
Comment Utility
Let's see your code...
0
 
LVL 16

Expert Comment

by:Richie_Simonetti
Comment Utility
pardon... your code?
I did that code all the time, see my profile.
0

Featured Post

Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Introduction In a recent article (http://www.experts-exchange.com/A_7811-A-Better-Concatenate-Function.html) for the Excel community, I showed an improved version of the Excel Concatenate() function.  While writing that article I realized that no o…
This article describes some techniques which will make your VBA or Visual Basic Classic code easier to understand and maintain, whether by you, your replacement, or another Experts-Exchange expert.
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…

744 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now