
![]() |
Наши проекты:
Журнал · Discuz!ML · Wiki · DRKB · Помощь проекту |
|
ПРАВИЛА | FAQ | Помощь | Поиск | Участники | Календарь | Избранное | RSS |
[216.73.216.52] |
![]() |
|
![]() |
Сообщ.
#1
,
|
|
![]() ![]() Private Declare Function DoFileDownload Lib "shdocvw.dll" (ByVal lpszFile As String) As Long Private Sub DownLoadFile(sUrl As String, sFile As String) Dim DL As Long On Error GoTo errHandler If Left(sUrl, 4) <> "http" Then sUrl = "http://" & sUrl If Right$(sUrl, 1) <> "/" Then sUrl = sUrl & "/" If Left$(sFile$, 1) = "/" Then sFile = Mid$(sFile$, 2) DL& = DoFileDownload(StrConv(sUrl & sFile$, vbUnicode)) Exit Sub errHandler: Debug.Print "Error Source:", Err.Source Debug.Print "Error Description:", Err.Description Debug.Print "Error Number:", Err.Number MsgBox "An error has occured attempting to start download to " & sUrl & sFile$ & ".", vbApplicationModal + vbCritical + vbDefaultButton1, "Error" End Sub Private Sub Form_Load() Call DownLoadFile("URL", "File Name") End Sub |