View Full Version : Source Code Automatic Update
ansav-reporter
11-12-2009, 01:35 AM
Bagi kawan-kawan yang pengen programnya bisa automatic update alias update otomatis, nieh saya baru nemu ada aplikasi anti virus yang memakai user control untuk mengambil file dari server dan file lama di tiban menjadi file yang baru di unduh.....mau coba monggo downloadnya di : ___http://www.pscode.com/vb/scripts/ShowCode.asp?txtCodeId=72084&lngWId=1 :pisangdance:
SEMOGA BERMANFAAT
dewaphobia
11-12-2009, 09:29 AM
sebenarnya trit ini salah tempat. nih codingnya...
Option Explicit
Private Declare Function URLDownloadToCacheFile Lib "urlmon" Alias "URLDownloadToCacheFileA" (ByVal lpUnkcaller As Long, ByVal szURL As String, ByVal szFileName As String, ByVal dwBufLength As Long, ByVal dwReserved As Long, ByVal IBindStatusCallback As Long) As Long
Private Function DownloadFile(URL As String) As String
Dim f As String
DownloadFile = vbNullString
f = Space$(255)
If Not URLDownloadToCacheFile(0, URL, f, Len(f), 0, 0) Then
DownloadFile = Trim(f)
End If
End Function
Private Sub Command1_Click()
Dim i As Long
Dim t As String
Dim p As String
Dim f As String
On Error GoTo ErrorHandler
t = DownloadFile("http://ansav.com/get.php?f=dbs.anv")
f = Mid$(t, InStrRev((t), "\"))
i = InStr(1, f, ".")
f = Mid$(f, 1, i - 4) & Mid$(f, i)
p = App.Path & f
FileCopy t, p
Kill t
MsgBox "Saved to " & p, vbInformation
Exit Sub
ErrorHandler:
MsgBox Err.Description, vbInformation
End Sub
HyperLinx
11-12-2009, 10:31 PM
om mimin momod tolong pindahin nih trit :pisangdance:
@dewaphobia
keren om, mau bikin plugin update buat ansav ya :pisangdance:
deny26
11-13-2009, 07:00 AM
Sip dah... Sharenya bagus...:D
dewaphobia
11-13-2009, 02:26 PM
om mimin momod tolong pindahin nih trit :pisangdance:
@dewaphobia
keren om, mau bikin plugin update buat ansav ya :pisangdance:
huahaha... sebenernya gk perlu di buat bos, lah wong ansave sendiri aja udah bisa automatic update. :D
FAKHRICKER
08-31-2010, 10:28 PM
sebenarnya trit ini salah tempat. nih codingnya...
Option Explicit
Private Declare Function URLDownloadToCacheFile Lib "urlmon" Alias "URLDownloadToCacheFileA" (ByVal lpUnkcaller As Long, ByVal szURL As String, ByVal szFileName As String, ByVal dwBufLength As Long, ByVal dwReserved As Long, ByVal IBindStatusCallback As Long) As Long
Private Function DownloadFile(URL As String) As String
Dim f As String
DownloadFile = vbNullString
f = Space$(255)
If Not URLDownloadToCacheFile(0, URL, f, Len(f), 0, 0) Then
DownloadFile = Trim(f)
End If
End Function
Private Sub Command1_Click()
Dim i As Long
Dim t As String
Dim p As String
Dim f As String
On Error GoTo ErrorHandler
t = DownloadFile("http://ansav.com/get.php?f=dbs.anv")
f = Mid$(t, InStrRev((t), "\"))
i = InStr(1, f, ".")
f = Mid$(f, 1, i - 4) & Mid$(f, i)
p = App.Path & f
FileCopy t, p
Kill t
MsgBox "Saved to " & p, vbInformation
Exit Sub
ErrorHandler:
MsgBox Err.Description, vbInformation
End Sub
Design formnya gimana om
Soalnya ane AV maker yg newbie
:D:D
widnyana putra
09-01-2010, 01:21 AM
ya buat aja command button dgn nama Command1.
kalo mau dicustom, bikin buat modif path naruh hasil downloadannya
@dewaphobia
itu bukannya source code bwt download aja? algo bwt ngecheck klo ada update barunya?
vBulletin® v3.8.4, Copyright ©2000-2013, Jelsoft Enterprises Ltd.