Solved

LocationURL of webBrowser control

Posted on 2001-08-20
9
204 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
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
 
LVL 16

Expert Comment

by:Richie_Simonetti
ID: 6408461
hearing...
0
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
LVL 16

Accepted Solution

by:
Richie_Simonetti earned 250 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Restricting text box entry from \/:?<>"| 9 76
VBS file using code from 2nd file (txt or vbs) 4 30
Using "ScreenUpdating" 6 55
vb6 connector to mongodb 2 46
Introduction While answering a recent question about filtering a custom class collection, I realized that this could be accomplished with very little code by using the ScriptControl (SC) library.  This article will introduce you to the SC library a…
Background What I'm presenting in this article is the result of 2 conditions in my work area: We have a SQL Server production environment but no development or test environment; andWe have an MS Access front end using tables in SQL Server but we a…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

914 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

22 Experts available now in Live!

Get 1:1 Help Now