|
-
Aug 2nd, 2004, 06:55 AM
#1
Thread Starter
PowerPoster
location of IE[resolved]
ok i'm trying to open IE with a chosen webpage now does the locatrion of internet ecplorer differ with OS
shell IExplorer(Webpage)
would that work? whats the best way to achieve this?
i know its possible with notepad because i've done it before,
VB Code:
Shell "notepad.exe " & sPath, vbMaximizedFocus
also is there a way to open a webpage up in the persons own webbrowser? ie there chosen one, IE firefox etc
Last edited by Pino; Aug 2nd, 2004 at 07:14 AM.
-
Aug 2nd, 2004, 06:59 AM
#2
VB Code:
Private Sub Command1_Click()
Dim ie As Object
Set ie = CreateObject("InternetExplorer.Application")
ie.Navigate "http://www.vbforums.com"
ie.Visible = True
Set ie = Nothing
End Sub
To use the default browser, open the URL through the ShellExecute API.
Laugh, and the world laughs with you. Cry, and you just water down your vodka.
Take credit, not responsibility
-
Aug 2nd, 2004, 07:00 AM
#3
Thread Starter
PowerPoster
but how do i know what there default browser is? thanks for the code by the way
-
Aug 2nd, 2004, 07:06 AM
#4
Originally posted by Pino
but how do i know what there default browser is?
That's the idea behind ShellExecute. You don't need to know or care. The system will open the correct program for you.
Laugh, and the world laughs with you. Cry, and you just water down your vodka.
Take credit, not responsibility
-
Aug 2nd, 2004, 07:07 AM
#5
Originally posted by Pino
but how do i know what there default browser is? thanks for the code by the way
You don't need to know :
VB 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
Const SW_SHOWNORMAL = 1
Private Sub Form_Load()
ShellExecute Me.hwnd, "open", "www.vbforums.com", vbNullString, "C:\", SW_SHOWNORMAL
End Sub
Has someone helped you? Then you can Rate their helpful post. 
-
Aug 2nd, 2004, 07:13 AM
#6
Thread Starter
PowerPoster
-
Aug 2nd, 2004, 07:19 AM
#7
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
|