Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
E-MAIL Application
Message
De
17/11/1998 14:01:44
 
 
À
17/11/1998 11:09:37
Information générale
Forum:
Visual FoxPro
Catégorie:
Fonctions Windows API
Divers
Thread ID:
00158081
Message ID:
00158382
Vues:
20
>>>oShell = CREATEOBJECT('Shell.Application')
>>>oShell.Open('Mailto:esmoore@flash.net')
>>
>>I have two objections to that. First, I've found some original Win95 systems that didn't support the Shell.Application automation object without further add-ons (like installing and version of IE 3 or later).
>>
>
>
>On all the systems I had personally tested on, Shell.Application was registered. I didn't realize until just last night that it wasn't a standard object with all Win32 systems.
>

Yep. I discovered it when my EnhancedGetDir(), which uses the BrowseForFolder method of Shell.Application, smoked on a couple of old Win95 boxes. It turns out that while SHELL32.DLL provides the underlying API, it's one of the browser components that's providing the automation object. The automation object is installed on all OSR2, Win98 and WinNT 4.0 releases, and can be added to original WIn95 by installing IE 3.0 or later, or WSH.

>>The other is it also seems to launch a browser window, which often comes to the top initially, and doesn't close down by itself.
>
>Yeah, this is why I have only recommended it for launching mail or web sites. This behavior is not consistent across different browsers, though. I am only just recently encountering it, but it comes up often enough that I think I will probably revert to ShellExecute.
>
>>
>>DECLARE INTEGER ShellExecute IN SHELL32 ;
>>   INTEGER hWnd, ;
>>   STRING lpOperation, ;
>>   STRING lpFile, ;
>>   STRING lpCmdLineParams, ;
>>   STRING lpStartingDir, ;
>>   INTEGER nShowCmd
>>=ShellExecute(0,'OPEN','MAILTO:edrauh@earthlink.net',0,0,0)
>>
>
>I have been using df's shellexecute class for this for a long time. It encapsulates this logic nicely. Also allows for different calls (print, etc.).
EMail: EdR@edrauh.com
"See, the sun is going down..."
"No, the horizon is moving up!"
- Firesign Theater


NT and Win2K FAQ .. cWashington WSH/ADSI/WMI site
MS WSH site ........... WSH FAQ Site
Wrox Press .............. Win32 Scripting Journal
eSolutions Services, LLC

The Surgeon General has determined that prolonged exposure to the Windows Script Host may be addictive to laboratory mice and codemonkeys
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform