Caos, naleteo sam na kod koji mi puno treba. U pitanju je kod za download sa nekog sajta. Ali imam problem 'ocu da korisnik upise putanju gde ce da sacuva fajl. Evo koda :
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
Public Function DownloadFile(URL As String, LocalFilename As String) As Boolean
Dim lngRetVal As Long
lngRetVal = URLDownloadToFile(0, URL, LocalFilename, 0, 0)
If lngRetVal = 0 Then DownloadFile = True
End Function
DownloadFile "http://www.nesto.com/fajl.zip", "c:\programzip"
Probao sam da dodam ineger i textbox ali nece :
Dim mesto as String
mesto = text1.text
DownloadFile "http://www.nesto.com/fajl.zip", mesto
Ali nece uopste da prihvati taj kod. Logicno je da prihvati. Verovatno neka mala sitnica. Kod je vrlo vazan pa vas molim ako neko moze da pomogne... Hvala
|