Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Can the browser be hidden when using a hyperlink?
Message
De
11/06/2008 17:26:31
 
 
À
11/06/2008 16:56:09
Mike Sue-Ping
Cambridge, Ontario, Canada
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows XP SP2
Divers
Thread ID:
01323285
Message ID:
01323297
Vues:
18
>I have an executable file that resides on a website that I'd like to download and run. If I use the following syntax:
>
>LOCAL oLink AS Hyperlink
>oLink=CREATEOBJECT("HyperLink")
>oLink.NavigateTo("http://www.somewhere.com/Downloads/setup.exe")
>
>My browser (IE7) popus up briefly then disappears leaving a "File Download" dialog from which I can choose to Run, Save or Cancel. While this works, I find it rather annoying that the browser has to flash the way it does.
>
>Does anyone know if this behaviour can be suppressed?
>
>TIA
>Mike

Use this function instead
Function getfilefromurl
   Lparameters lcRemoteFile,lcLocalFile
   Local lnReturn
   Declare Integer URLDownloadToFile In urlmon.Dll;
      INTEGER pCaller, String szURL, String szFileName,;
      INTEGER dwReserved, Integer lpfnCB
   lnReturn = URLDownloadToFile (0, lcRemoteFile, lcLocalFile, 0, 0)
   Return lnReturn=0
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform