|
-
Aug 14th, 2000, 09:44 AM
#1
Thread Starter
Junior Member
Ok
Well now that my loop is working I was hoping some one chould tell me how to make Internet Explorer go to a web site when I press a butten on my form
Thanks
P.s. the form will also hide and do other stuff when the butten is pressed
Always let the Wookiee Win!
-
Aug 14th, 2000, 09:51 AM
#2
The simpliest way is to use ShellExecute:
Code:
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 Me.hwnd, "Open", "http://www.vb-world.net", _
"", "", vbNormalFocus
End Sub
Good luck!
-
Aug 14th, 2000, 10:12 AM
#3
Thread Starter
Junior Member
Thank, BUT
where do I put the
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
Always let the Wookiee Win!
-
Aug 14th, 2000, 10:20 AM
#4
Frenzied Member
API declarations would usually go in a module but you can put it in a form if you put "Private Declare Function ...."
-
Aug 14th, 2000, 10:20 AM
#5
put the code where ???
I'll nip in here & answer this bit!
put a private before that and place the code right at the top of the form (above everything else).
Hope this helps!
Alex Read
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|