Click to See Complete Forum and Search --> : Invoking a default Internet browser!!
Jono2298
Mar 28th, 2000, 11:28 PM
I need help! I have figured out how to invoke IE, but I am unsure how to invoke a default browser (So Communicator will open if it happens to be the default browser). I would really appreciate any help that anyone can offer.
Thanks in Advance
Jono2298
CarlosTheJackal
Mar 29th, 2000, 03:14 AM
Hey- If you're only developing for win95/98 and not nt,
use
Shell "start http://www.vb-world.net"
If you want it to work in win95/98 and NT, use:
'All of the following on one line
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 0, "OPEN", "http://www.vb-world.net", "", "", 1
End Sub
-The nt compliant code is from Aaron Young
Thnx for your time,
CarlosTheJackal
Rusty
Apr 1st, 2000, 02:24 AM
Carlos,
I tried the shell command which worked great on the system I'm working on. When I load my program on another system, it brings up an MSDOS program and says it can't find a program called PROGRAM. Is there a file I'm forgetting to add to my install or on my form?
Thanks,
Rusty
CarlosTheJackal
Apr 1st, 2000, 10:06 AM
hey- First, Is the system that gave you the error running windows nt? if so you need to use then shellexecute code i gave you, if its running windows 3x/9x, then i haven't the foggiest idea what to tell you other than to try the shellexecute code...it's not a file you're not providing,it sounds like a windows file association somehow got wierded out (but not because of the code i gave you or anything your program is doing)...i suggest just trying the shellexecute code, and if that doesnt work keep posting, and hope one of the great gurus here is reading :)
Thnx for your time,
CarlosTheJackal
vbforums.com
Copyright Internet.com Inc., All Rights Reserved.