| View previous topic :: View next topic |
| Author |
Message |
AdamWest Master Cheater
Reputation: 0
Joined: 05 Jul 2007 Posts: 354 Location: Quahog, Rhode Island
|
Posted: Fri May 02, 2008 8:36 am Post subject: How do I open a web page from a button click? [VB6] |
|
|
/topic
_________________
"I myself am made entirely of flaws, stitched together with good intentions." - Augusten Burroughs |
|
| Back to top |
|
 |
92Garfield I'm a spammer
Reputation: 57
Joined: 20 Dec 2007 Posts: 5871 Location: Banana Republic Germany
|
Posted: Fri May 02, 2008 8:41 am Post subject: |
|
|
in components there is a webbrowser element
add it to form
then use
webbrowser.navigate ("url")
or sth similar
_________________
|
|
| Back to top |
|
 |
Typhoon808 Expert Cheater
Reputation: 0
Joined: 27 Mar 2008 Posts: 175 Location: Wales
|
|
| Back to top |
|
 |
atom0s Moderator
Reputation: 205
Joined: 25 Jan 2006 Posts: 8587 Location: 127.0.0.1
|
Posted: Fri May 02, 2008 10:00 am Post subject: |
|
|
While Shell requires no extra defines and such, ShellExecute will use the systems default browser:
| Code: | Option Explicit
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 Command1_Click()
ShellExecute vbNull, "open", "http://www.google.com", vbNull, vbNull, vbNull
End Sub |
_________________
- Retired. |
|
| Back to top |
|
 |
AdamWest Master Cheater
Reputation: 0
Joined: 05 Jul 2007 Posts: 354 Location: Quahog, Rhode Island
|
Posted: Fri May 02, 2008 1:33 pm Post subject: |
|
|
It's solved guys, thanks though XD
_________________
"I myself am made entirely of flaws, stitched together with good intentions." - Augusten Burroughs |
|
| Back to top |
|
 |
|