Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Have function or command to write download internet movi
Message
From
25/01/2011 22:26:11
 
General information
Forum:
ASP.NET
Category:
Coding, syntax and commands
Environment versions
Environment:
VB 9.0
OS:
Windows XP
Miscellaneous
Thread ID:
01497322
Message ID:
01497408
Views:
50
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")
Previous
Reply
Map
View

Click here to load this message in the networking platform