|
-
Aug 6th, 2006, 04:30 PM
#1
Thread Starter
Lively Member
[RESOLVED] textbox to show current webbrowser url
Well, in vb.net 2005, how can i make is so that after the webbrowser has navigated to site, the site address is displayed in a textbox?
Cheers!
Last edited by Untouchab1e; Aug 6th, 2006 at 06:40 PM.
Reason: resolved
-
Aug 6th, 2006, 06:17 PM
#2
Re: textbox to show current webbrowser url
Well you pass the string that you want to go to into the .Navigate method of the Webbrowser, correct? Before that line of code just update the text of a textbox with that same string...
-
Aug 6th, 2006, 06:19 PM
#3
Thread Starter
Lively Member
Re: textbox to show current webbrowser url
yeh, ive got that part figured out. (if I understood your reply), but lets say i go to google.com... if i write google.com in the textbox, it wont update to http://www.google.com which is the real address. Also, if i click a link, lets say http://www.google.com/somecrazylink , the textbox wont update to show that address..
This is what im trying to accomplish 
Cheers!
-
Aug 6th, 2006, 06:22 PM
#4
Re: textbox to show current webbrowser url
Well there is a Navigating event of the Webbrowser control, you can update the text in that event (or the Navigated event, but the former allows them to see the site before it actually finishes loading). Just display the URL of the passed in argument object of the event..
VB Code:
Private Sub WebBrowser1_Navigating(.....) Handles WebBrowser1.Navigating
TextBox1.Text = e.Url.ToString
End Sub
Last edited by gigemboy; Aug 6th, 2006 at 06:26 PM.
-
Aug 6th, 2006, 06:35 PM
#5
Re: textbox to show current webbrowser url
VB Code:
Private Sub WebBrowser1_DocumentCompleted(ByVal sender As System.Object, ByVal e As System.Windows.Forms.WebBrowserDocumentCompletedEventArgs) Handles WebBrowser1.DocumentCompleted
WebBrowser1.Document.Url.AbsoluteUri
End sub
There you go
-
Aug 6th, 2006, 06:36 PM
#6
Re: textbox to show current webbrowser url
blast! Too late then
-
Aug 6th, 2006, 06:40 PM
#7
Thread Starter
Lively Member
Re: textbox to show current webbrowser url
thanks for the help! Now its just a matter of that damned tabcontrol problem (see other post)
Cheers!
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|