Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Can the browser be hidden when using a hyperlink?
Message
From
11/06/2008 17:26:31
 
 
To
11/06/2008 16:56:09
Mike Sue-Ping
Cambridge, Ontario, Canada
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows XP SP2
Miscellaneous
Thread ID:
01323285
Message ID:
01323297
Views:
17
>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
Previous
Reply
Map
View

Click here to load this message in the networking platform