[ salutis @ 11.04.2006. 06:03 ] @
Kako da raspakujem zipovan fajl na zadatu lokaciju pomoću VB 6.0 |
[ salutis @ 11.04.2006. 06:03 ] @
[ mLAN @ 11.04.2006. 08:03 ] @
[ zeljo @ 15.04.2006. 15:21 ] @
Pogledaj malo kod i mora imati jos .del i ocx kontrole za ovo vidi jeli ok pa se javi E-mailom da ti posaljem primjer
Code: Private Sub cmdAddFiles_Click() Dim sZipList As String, sZipFileName As String Dim iRet As Integer picStatus.Cls txtReturnCode.Text = "" sZipList = txtFiletoAdd.Text Debug.Print "Your current zip list file is : "; sZipList 'EzZip1.RootDirectory = "D:\Utilities" EzZip1.RootDirectory = App.Path EzZip1.UseComment = True EzZip1.Comment = "Ryan is an Ass Monkey" EzZip1.Quiet = False EzZip1.Verbose = True EzZip1.Compression = 0 EzZip1.Update = False EzZip1.UseTempDir = True EzZip1.TempDirectory = Environ("Temp") sZipFileName = App.Path & "\MyCtrlFirst.Zip" 'If Len(Dir(sZipFileName)) = 0 Then ' ' File not found! ' MsgBox "File Not Found!", vbInformation ' Exit Sub 'End If cmdAddFiles.Enabled = False iRet = EzZip1.Add(sZipFileName, sZipList) Beep cmdAddFiles.Enabled = True txtReturnCode.Text = "Return Code: " & Str(iRet) End Sub Private Sub cmdDeleteFile_Click() Dim sZipList As String Dim iRet As Integer picStatus.Cls txtReturnCode.Text = "" sZipList = txtFileToDelete.Text Debug.Print "Your current zip list file is : "; sZipList 'EzZip1.RootDirectory = "D:\Utilities" 'EzZip1.RootDirectory = App.Path 'EzZip1.Quiet = False 'EzZip1.DeleteEntries = True 'EzZip1.Verbose = True 'EzZip1.UseTempDir = True 'EzZip1.TempDirectory = Environ("Temp") 'EzZip1.Compression = 6 'EzZip1.Update = False cmdDeleteFile.Enabled = False iRet = EzZip1.Delete(App.Path & "\MyCtrlFirst.Zip", sZipList) Beep cmdDeleteFile.Enabled = True txtReturnCode.Text = "Return Code : " & Str(iRet) End Sub Private Sub cmdZip_Click() '' Dim sZipList As String Dim iRet As Integer picStatus.Cls txtReturnCode.Text = "" sZipList = "*.*" Debug.Print "Your current zip list file is : "; sZipList 'EzZip1.RootDirectory = "D:\Utilities" EzZip1.RootDirectory = App.Path EzZip1.UseComment = True EzZip1.Comment = "This is a test comment for the zip file created by the EZzip Object." EzZip1.Quiet = False EzZip1.Verbose = True EzZip1.Compression = 9 EzZip1.UseTempDir = True EzZip1.TempDirectory = Environ("Temp") EzZip1.Recurse = 1 EzZip1.Update = True EzZip1.TrashDirectorys = False EzZip1.Encryption = True EzZip1.Password = "ass" EzZip1.IncludeSystemHidden = True EzZip1.ForceDOSFilenames = False cmdZip.Enabled = False iRet = EzZip1.Create(App.Path & "\MyCtrlFirst.Zip", sZipList) Beep txtReturnCode.Text = "Return Code: " & Str(iRet) cmdZip.Enabled = True End Sub Private Sub EzZip1_StatusMsg(Message As String) ' When a message comes in display it in the txtStatus ' box 'picStatus.Cls picStatus.Print Message End Sub Private Sub Form_Load() On Error GoTo ErSub ' Initalize the control Dim lReturn As Long lReturn = EzZip1.sInitalize If lReturn <> 0 Then Err.Raise lReturn End If Exit Sub ErSub: MsgBox Err.Description, vbCritical, "Error:" & Err Unload Me End End Sub Edit : Dodati code tagovi [Ovu poruku je menjao Marko_L dana 15.04.2006. u 22:50 GMT+1] Copyright (C) 2001-2025 by www.elitesecurity.org. All rights reserved.
|