Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Have function or command to write download internet movi
Message
De
25/01/2011 22:26:11
 
Information générale
Forum:
ASP.NET
Catégorie:
Code, syntaxe and commandes
Versions des environnements
Environment:
VB 9.0
OS:
Windows XP
Divers
Thread ID:
01497322
Message ID:
01497408
Vues:
51
i find the function, but i use this function can' t to download file , may be i don't know how to use,
but no error , i also download this file?
Private Declare Function URLDownloadToFile Lib "urlmon" Alias "URLDownloadToFileA" (ByVal pCaller As Long, ByVal szURL As String, ByVal szFileName As String, ByVal dwReserved As Long, ByVal lpfnCB As Long) As Long

Private Sub DLtest()
        Dim MYurl As String
        Dim MYpath As String
        Dim MYfilename As String
        Dim hfile As Long
        MYurl = "http://www.tse.com.tw/ch/trading/exchange/MI_INDEX/MI_INDEX3_print.php?genpage=genpage/Report200902/A11220090201ALL_1.php&type=csv"
        
        hfile = URLDownloadToFile(0, MYurl, "c:\1.csv", 0, 0)
        If hfile = 0 Then
            Shell("c:\1.csv", vbHide)
        End If
    End Sub
--------------------------------------------------------------------------

But i search the internet , i find this function , is ok

Dim MyD As WebClient = New WebClient()
MyD.DownloadFile("http://l.yimg.com/mq/i/home/pa-auc.gif", "C:\1.gif")
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform