how to write in vb if http:// or https:// is not in string..
how to write in vb if http:// or https:// is not in string..
Ok i have taken making an internet explorer to the next level by making one of my own to give away on my site but how would you make it that it includes the http:// if it isnt there
-
- Posts: 94
- Joined: Mon Nov 15, 2004 7:01 pm
- Location: over there
ok normally if you type in www.google.com it will go into it and put in the http:// but in the program if you just leave it , it wont. it will do nothing if u dont put in http.
-
- Posts: 115
- Joined: Fri Jan 14, 2005 9:26 am
- Location: Why The Fuck Would I Tell You? Indiana...
- Contact:
-
- Posts: 115
- Joined: Fri Jan 14, 2005 9:26 am
- Location: Why The Fuck Would I Tell You? Indiana...
- Contact:
IE isn't that good. It's just bundled with windows so everyone uses it. Back on topic, what language are you programing this browser in?
How to Post Correctly
SWYgeW91IGNhbiByZWFkIHRoaXMgeW91IGhhdmUgd2F5IHRvIG11Y2ggdGltZSBvbiB5b3VyIGhhbmRz
SWYgeW91IGNhbiByZWFkIHRoaXMgeW91IGhhdmUgd2F5IHRvIG11Y2ggdGltZSBvbiB5b3VyIGhhbmRz
-
- Posts: 94
- Joined: Mon Nov 15, 2004 7:01 pm
- Location: over there
But if the person already typed http:// that wouldn't work. If it's vb use this.
Code: Select all
If LCase(Left(URL, 7)) <> "http://" Then URL = "http://" + URL
How to Post Correctly
SWYgeW91IGNhbiByZWFkIHRoaXMgeW91IGhhdmUgd2F5IHRvIG11Y2ggdGltZSBvbiB5b3VyIGhhbmRz
SWYgeW91IGNhbiByZWFkIHRoaXMgeW91IGhhdmUgd2F5IHRvIG11Y2ggdGltZSBvbiB5b3VyIGhhbmRz
it works all right but when i go to run it , it says there is an error but it still runsThebirthdayhat wrote:i think this si wat ure talking bout.
say that the thing u type the url in is named text1 and the explorer thing is named webbrowser1, type this in the code
webbrowser1.navigate = "http//:" + text1.Text
that might work i have no idea im just guessing
What is the error?
How to Post Correctly
SWYgeW91IGNhbiByZWFkIHRoaXMgeW91IGhhdmUgd2F5IHRvIG11Y2ggdGltZSBvbiB5b3VyIGhhbmRz
SWYgeW91IGNhbiByZWFkIHRoaXMgeW91IGhhdmUgd2F5IHRvIG11Y2ggdGltZSBvbiB5b3VyIGhhbmRz
sry it doesnt matter the error was something to do with another thing i fixed but i still got the problem with the http if the user types it in , it doesnt get the address and one more thing how would i make it that it gets the address when i press enter aswell and Cheech|N|Chong i would just have to say that internet explorer is so crap and vb is so easy (and kinda booring cus of it) that it would take me 1 day flat out to make a new one that would be better then it but i cant prove that cus i always will have something to do and ne way the pizza would run out =)
On key down use this code:
Code: Select all
If KeyCode = vbKeyReturn Then
'Code for enter key goes here
End If
How to Post Correctly
SWYgeW91IGNhbiByZWFkIHRoaXMgeW91IGhhdmUgd2F5IHRvIG11Y2ggdGltZSBvbiB5b3VyIGhhbmRz
SWYgeW91IGNhbiByZWFkIHRoaXMgeW91IGhhdmUgd2F5IHRvIG11Y2ggdGltZSBvbiB5b3VyIGhhbmRz
-
- Posts: 94
- Joined: Mon Nov 15, 2004 7:01 pm
- Location: over there
-
- Posts: 732
- Joined: Wed Nov 26, 2003 11:59 pm
- Location: Raleigh, NC, USA
![]() |