Web Browser Help

daveofgv

Well-known member
Joined
Sep 17, 2008
Messages
218
Location
Dallas, TX
Programming Experience
1-3
Hello all,

I have a 3 questions that I would like to ask....

If anyone could help me I appreciate it.....

I have made a kiosk type software (for my 7 year old daughter so she can only do what I want her to do on one of our computers)

1. I have a toolstripcombobox that will be where she puts in the url's. I need information on keeping the history of where she goes? So when she clicks the arrow to the right it lists all the sites she has been to.

2. Right now, the webbrowser navigates to where the url is (www. vbdotnetforums.com), but when you click a link it dosn't update the textbox with the new url (http ://www vbdotnetforums.com/security/34004-login-problem.html). It just stays at the first url.... Anyone know how to fix this?

3. Any help being able to add tabs and load the tab with the url like internet explorer?

If anyone can help I would appreciate it.

Thanks in advanced

daveofgv
 
Last edited:
I have found the answer to question #1.

I am now using

VB.NET:
Combobox1.items.add(webbrowser1.url.tostring)
[\code]

With a timer

But I still can't find the answers to question #2 and #3

Thanks in advanced..

daveofgv
 
FIRST

first, if you add the history to the item list in the combobox, she'd come to know that you're tracking it down because it suggests the URLs she's been to, if you don't mind that, then here's the code...

the controls are

toolstripcombobox1
webbrowser1
form1
richtextbox1

webbrowser1's documentcompleted sub
' the code starts from below...
richtextbox1.text=richtextbox1.text & webbrowser1.url.tostring & My.Computer.Clock.LocalTime.TimeOfDay.ToString & ":" & My.Computer.Clock.LocalTime.date & vbcrlf & vbcrlf
'end of code

set the richtextbox1.readonly to true so ur daughter cant edit it... and of course u have 2 save the file so...

form1 formclosing
my.computer.filesystem.writealltext("c:/somefolder/somesubfolder/nothingtoworry.txt", richtextbox1.text, false)

'done

you'll notice the directory above should be rplaced by the one that she doesn't know...

and if u want her to see which websites she visits (besides the richtextbox), u can add the following to the document completed event for webbrowser1

'code

toolstripcombobox1.items.add (webbrowser1.url.tostring)
form1.text=webbrowser1.documenttitle.tostring
toolstripcombobox1.text=webbrowser1.url.tostring

'end
SECOND

second one is mentioned above already, the last line of code in the FIRST solution...

THIRD

are u sure u want tabs, they can be a head ache to re code all, the code for new window is

first add a new button for opening a new window

then put the following code

'started

dim blah as new form1
blah.show
blah.webbrowser1.documenttext=webbrowser1.documenttext.tostring

'ended

so if you want code for new tab, reply me and i'll send you the whole stuff, a head ache to re code for a newbie though...

and why dont u add some extras for her? just ask me... i not an expert in vb.net though, im only 13 so i may have dont some errors up there... i use VISUAL BASIC EXPRESS 2008 so the code may defer...

please dont just copy and paste my code, retype it because if there are any spelling mistakes, u can see in the suggestions what it actually is...
 
Back
Top