
06-29-2003, 09:16 AM
|
 |
Senior Contributor
* Expert *
|
|
Join Date: Jul 2003
Location: Ashby, Leicestershire.
Posts: 967
|
|
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 Const SW_NORMAL As Long = 1
Private Sub Command1_Click()
ShellExecute Me.hwnd, "open", "http://google.com", vbNullString, vbNullString, SW_NORMAL
'/// this makes your exsisting browser navigate to the new page if you have a browser open.
'///you must have the ShellExecute referenced on your project like above^^^
End Sub
Private Sub Command2_Click()
Shell "explorer.exe http://google.com", vbNormalFocus
'///this opens a new instance of internet explorer.
'///you dont need the shellexecute api referenced this way.
End Sub
|
__________________
~~ please don't PM me regarding code, I only reply to personnal messages ~~
|