|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
How to Direct to website
How do i make it so when you click on a command button it sends you to a website? I looked everywhere for how to do this. Sorry about the noob question lol
Thank you! |
|
#2
|
||||
|
||||
|
ShellExecute API (this launches in the default browser I presume this is what you want and you're not using a web browser control)
Code:
Private 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
Private Sub Command5_Click()
ShellExecute 0, "open", "http://medialint.com", vbNullString, vbNullString, 1
End Sub
__________________
medialint.com Now I don't know, but I been told it's hard to run with the weight of gold. Other hand I have heard it said, it's just as hard with the weight of lead. |
|
#3
|
|||
|
|||
|
I keep getting compile error: only comments may appear after end sud end function or end property
|
|
#4
|
||||
|
||||
|
Place the declaration on the very top of your code.
Code:
Private 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 |
|
#5
|
|||
|
|||
|
O ok it works now thanks you guys!
|
![]() |
| Viewing: Dev Shed Forums > Programming Languages - More > Visual Basic Programming > How to Direct to website |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|