View previous topic :: View next topic |
Author |
Message |
DURAN Newbie cheater
Reputation: 14
Joined: 19 Apr 2007 Posts: 16 Location: The Netherlands
|
Posted: Fri Dec 07, 2007 12:52 pm Post subject: Help |
|
|
I wanna open with the button www.google.com in VB6
can someone give a code?
|
|
Back to top |
|
 |
Blader I post too much
Reputation: 2
Joined: 19 Jan 2007 Posts: 2049
|
Posted: Fri Dec 07, 2007 2:08 pm Post subject: |
|
|
First declare some stuff
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 Const SW_SHOWNORMAL = 1
Private Const SW_SHOWMAXIMIZED = 3 |
Now for the button code:
Code: | Private Sub command1_Click()
ShellExecute ByVal 0&, "open", _
"http://www.google.com", _
vbNullString, vbNullString, _
SW_SHOWMAXIMIZED
End Sub |
It opens in default browser and opens in a tab
_________________
|
|
Back to top |
|
 |
atom0s Moderator
Reputation: 205
Joined: 25 Jan 2006 Posts: 8587 Location: 127.0.0.1
|
Posted: Fri Dec 07, 2007 3:58 pm Post subject: |
|
|
Please use the search button before asking questions like this too. It has been asked dozens of times and all have gotten the same answer.
_________________
- Retired. |
|
Back to top |
|
 |
DURAN Newbie cheater
Reputation: 14
Joined: 19 Apr 2007 Posts: 16 Location: The Netherlands
|
Posted: Sat Dec 08, 2007 5:03 am Post subject: |
|
|
wow thanks and uhm i want a code if i click the button a new form comes out
|
|
Back to top |
|
 |
Pseudo Xero I post too much
Reputation: 0
Joined: 16 Feb 2007 Posts: 2607
|
Posted: Sat Dec 08, 2007 5:05 am Post subject: |
|
|
MobScene wrote: | wow thanks and uhm i want a code if i click the button a new form comes out |
Google is there for a reason.
_________________
haxory' wrote: | can't VB do anything??
windows is programmed using VB right? correct me if im wrong.
so all things in windows you have like the start menu is a windows form too. |
|
|
Back to top |
|
 |
|