Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

LocationURL of webBrowser control

Posted on 2001-08-20
9
Medium Priority
?
232 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 2
  • 2
  • +1
9 Comments
 
LVL 6

Expert Comment

by:devtha
ID: 6407531
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
ID: 6407598
Yes.. <smile>
0
 
LVL 11

Author Comment

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

Kurt
0
Independent Software Vendors: 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!

 
LVL 16

Expert Comment

by:Richie_Simonetti
ID: 6408461
hearing...
0
 
LVL 16

Accepted Solution

by:
Richie_Simonetti earned 1000 total points
ID: 6408486
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
ID: 6409570
Thanks!
0
 
LVL 6

Expert Comment

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

Author Comment

by:kmartin7
ID: 6409738
Let's see your code...
0
 
LVL 16

Expert Comment

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

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

When trying to find the cause of a problem in VBA or VB6 it's often valuable to know what procedures were executed prior to the error. You can use the Call Stack for that but it is often inadequate because it may show procedures you aren't intereste…
Article by: Martin
Here are a few simple, working, games that you can use as-is or as the basis for your own games. Tic-Tac-Toe This is one of the simplest of all games.   The game allows for a choice of who goes first and keeps track of the number of wins for…
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 utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
Suggested Courses

704 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