Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
ShellExecute should call Netscape, but isn't
Message
From
27/07/2000 17:39:10
 
 
To
18/07/2000 14:26:20
General information
Forum:
Visual FoxPro
Category:
Internet applications
Miscellaneous
Thread ID:
00393880
Message ID:
00397913
Views:
13
>>I have a form in my program that allows the user to enter a URL, click a button, and have the site come up in their default Internet browser. On one computer, their default browser in Netscape Communicator 4.7 (downloaded and installed last Thursday).
>>The button is based on the _hyperlinkcommandbutton class from the _hyperlink class library found in VFP, and it is their code that is running. The registry entry HEKY_CLASSES_ROOT\http\shell\open\ddeexec\Application is checked to see what my default browser is (in this case "nsshell"). If it is not "iexplore" (which is Internet Explorer), it calls the ShellExecute API function, passing it the URL.
>>
>
>Without digging through the FFC code, have you tried just a simple ShellExecute? What does that do?

I created a program with the following code:

lcURL = "http://www.microsoft.com/"

DECLARE INTEGER ShellExecute IN SHELL32 ;
INTEGER, ;
STRING, ;
STRING, ;
STRING, ;
STRING, ;
INTEGER

=ShellExecute(0, ;
'OPEN',;
lcUrl,;
'',;
'',;
1)


I ran this in several ways: running it as a.prg from the Command Window, building it into an executable and running it from Command, and running the executable outside of VFP. In all cases, it brought up Netscape NAvigator and wnet to the Microsoft site, as expected. This shows that the ShellExecute API call is not the culprit.

Has anyone else run into any proiblems using the _hyperlink class, unmodified, to open a URL when Netscape is the default browser? As I stated in my original message, the class works correctly when I run my application from source code within VFP, but insists on bringing up Internet Explorer when I run it from an executable.

I'm going to try uninstalling Internet Explorer and see what happens, and I'm also going to create a simple executable with a text box and a command button based on the _hyperlinkcommandbutton class. I am somewhat reluctant to tinker with a Microsoft-written class library, but I may not have much choice but to do some trial-and-error work on it.

TIA,
Bill
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform