[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

Unzip a file in VB code without pkunzip....

Posted on 1997-05-28
2
Medium Priority
?
431 Views
Last Modified: 2010-05-18
I have to unzip a file in Visual Basic 4.0
How can I do that?
0
Comment
Question by:yello
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 2

Accepted Solution

by:
vorlon earned 100 total points
ID: 1426605
Yello,
Here's a way that I use and might work for you. It might work because I'm using vb3. The principal for vb4 should be identical.

What I do is I create a pif file that actually calls the pkunzip dos command. I set the pif file to run minimized, without focus and to terminate as soon as the pkunzip command is done. Form the  vb code just shell out the pif filename like this:

Sub Form_Click ()
    Dim x As Integer
    x = Shell("c:\myfiles\myunzip.pif c:\ziplib\file1.zip c:\temp", 6)
End Sub

Here, the 6 is redundant since the pif file is already setup to run minimized.

The pif file is easy to create. Only 2 fields need to be entered: the program name (pkunzip.exe) and the program title (My Unzip, or something).

The string that gets passed to the shell command has the following structure:

command params

where command is the pif file, and params is the parameters passed to the pif file. In the example above:

c:\myfiles\myunzip.pif c:\ziplib\file1.zip c:\temp

the pif file will unzip file c:\ziplib\file1.zip into c:\temp.

Hope this helps
0
 
LVL 4

Expert Comment

by:Chizl
ID: 1426606
http://www.apexsc.com/vb/ftp/misc/addzip.zip

The addZIP Compression Libraries are powerful, easy-to-use, PKZIP-compatible compression APIs for Windows. They allow the developer to add PKZIP-functionality to their programs. Includes source code (VB3) for a drag-and-drop .ZIP file manager.
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

When designing a form there are several BorderStyles to choose from, all of which can be classified as either 'Fixed' or 'Sizable' and I'd guess that 'Fixed Single' or one of the other fixed types is the most popular choice. I assume it's the most p…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
Suggested Courses

649 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question