[VB6] Making a button link to web page?

Skilled Illusionist
Joined
Dec 7, 2007
Messages
337
Reaction score
0
i've tried a few codes.. including this... but it doesnt work, i jus get this error..

Code:
Private Sub Button1_Click_1(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click 

System.Diagnostics.Process.Start(" http://www.hotmail.com") end sub

!BERZERK! - [VB6] Making a button link to web page? - RaGEZONE Forums


plz help,

!BERZERK!
 
Re: [HELP][VB6][NOOB]making a button link to web page?

Ummm
Code:
 Private Sub Command1_click()
Shell ("Explorer YOUR SITE HERE")
End Sub
 
Re: [HELP][VB6][NOOB]making a button link to web page?

thx man, really really needed this.
 
Re: [HELP][VB6][NOOB]making a button link to web page?

Yea I Forgot To Add The _Click on Command1 Sorry I just Wrote it Like Just Now
 
Re: [HELP][VB6][NOOB]making a button link to web page?

i saw, i fixed it
 
Re: [HELP][VB6][NOOB]making a button link to web page?

yea Does it Work???
Cuz U Don't Really Need ALl the Complicated Things As U Tried
 
Re: [HELP][VB6][NOOB]making a button link to web page?

i've tried a few codes.. including this... but it doesnt work, i jus get this error..

Code:
Private Sub Button1_Click_1(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click 

System.Diagnostics.Process.Start(" http://www.hotmail.com") end sub
!BERZERK! - [VB6] Making a button link to web page? - RaGEZONE Forums


plz help,

!BERZERK!
To tell the truth, I don't even know where you got that code from.

But as Chamillionaire said, the simplest code would be:
Code:
Shell ("Explorer WWW.YOURSITE.COM")
End Sub

Basically, this opens the website in your default browser.
Optionally, you could use a WebBrowser, but I think you'd prefer the 'Shell' method.

Yours Truly,
Golden Eye
 
Re: [HELP][VB6][NOOB]making a button link to web page?

I know i Say Like The By Val And All That Crap I Thought He was Like A technical Coder I Didn't even Read The Title i just Go For Anything That Goes VB6 And It's Like Like Using The Shell
 
Re: [HELP][VB6][NOOB]making a button link to web page?

If you want the link to pop up in the set browser (like my set browser is Mozilla) then the code might be...

Code:
shell="http://linktowebpagegoeshere.com/"
 
Re: [HELP][VB6][NOOB]making a button link to web page?

Well Duh ALl Noobs like Doing That.. (No offense) Like Before I Made Something That Was Like A Habbo Package With ALl the Links Reqired But I Didn't Release Cuase Mine Was Like Everything Else. Now I like Coding To the Xtreme Like i Could Turn Those Crappy Habbo packs To like A Habbo Pack With Games, Music, Codes, Full Screen, Videos, Some Type on Winsock connection of Some Sort. (All of That Is Copyright @Chamillionaire, Don't Take My Ideas)


@Chamillionaire
 
Re: [HELP][VB6][NOOB]making a button link to web page?

Well Duh ALl Noobs like Doing That.. (No offense) Like Before I Made Something That Was Like A Habbo Package With ALl the Links Reqired But I Didn't Release Cuase Mine Was Like Everything Else. Now I like Coding To the Xtreme Like i Could Turn Those Crappy Habbo packs To like A Habbo Pack With Games, Music, Codes, Full Screen, Videos, Some Type on Winsock connection of Some Sort. (All of That Is Copyright @Chamillionaire, Don't Take My Ideas)


@Chamillionaire
LMFAO nice man, btw i joined habotize, XD and yes, it is for a habbo pack, DHDL to be exact, its just to try and get a handle on the basics of VB6
 
Re: [HELP][VB6][NOOB]making a button link to web page?

Trust me i've Seen Alot of Habbo Packs...
Some Are ACtrully Good, Most of Them Sucks..
 
Re: [HELP][VB6][NOOB]making a button link to web page?

Alternate Method (which I prefer using)--

Code:
Public Declare Function ShellExecute Lib "shell32.dll" Alias "ShellExecuteA" (ByVal hwnd As Long, ByVal lpOperation As String, ByVal lpFile As String, ByVal lpParameters As String, ByVal lpDirectory As String, ByVal nShowCmd As Long) As Long

Sub VisitWebsite(Website As String)
If ShellExecute(&O0, "Open", Website$, vbNullString, vbNullString, SW_NORMAL) < 33 Then
End If
End Sub
 
Re: [HELP][VB6][NOOB]making a button link to web page?

nah, just do the simple basic as

cham did

it's easier don't do the alternate method (imo). You seem like a beginner... just go with the basics and use google or microsoft to help you

go on microsoft.com and look for help on vb6 coding
 
Re: [HELP][VB6][NOOB]making a button link to web page?

You put VB.NET code into a VB6 project. VB.NET is different from VB6. Just had to say it since no one else mentioned it.
 
Re: [HELP][VB6][NOOB]making a button link to web page?

If you want the link to pop up in the set browser (like my set browser is Mozilla) then the code might be...

Code:
shell="http://linktowebpagegoeshere.com/"

where's the end sub?

it must be
Shell ("Explorer "YOUR SITE HERE")
End Sub
 
Back