CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 1 of 1

Thread: Problem creating .zip file with password

  1. #1
    Join Date
    Feb 2003

    Problem creating .zip file with password

    Making a .zip file from a .pdf file with password I have the problem when I include
    '.encrypt = true I get a error. There wil not be made a .zip file at all.
    With .encrypt=False and stil have the .PasswordRequest filled in the .zip file is made correct
    but can be opened without password.
    Please help.

    Option Explicit
    Dim BestandIn As String
    Dim BestandUit As String
    Private WithEvents m_cZ As cZip
    Private Sub Command1_Click()
        Set m_cZ = New cZip
        With m_cZ
           .ZipFile = App.Path & "\loonstrook.zip"
           .BasePath = App.Path
           .Encrypt = True
           .PasswordRequest "Herman", 8, False, False
           .AddFileSpec "loonstrook.pdf"
           If .Success = False Then
            MsgBox "Foutje"
           End If
        End With
    End Sub
    Attached Images Attached Images  

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Windows Mobile Development Center

Click Here to Expand Forum to Full Width

On-Demand Webinars (sponsored)