Program | Compression when we write the program, will often encounter the program information content updates, for small file updates, can provide customers to the network download, but for large and many files, due to the network reasons, through the download is not practical, often update incomplete, affecting the operation of the program. When I was writing "Business Entertainment channel system", also encountered such a problem, for large video and picture files, I consider the use of compressed packets to provide to customers, but by using the compression program but I can not be extracted from my files as required to the corresponding directory, At that time I thought about why not make a compression and decompression program. Unzip the file to the location where the program is being extracted.
For this project, I carefully studied the VB installation program, the original VB is the system from the resources to carry out compression and decompression, such as MakeCab.exe, Vb6stkit.dll and so on.
Actually really do it is quite simple, is called a few API functions can be done. Recently, there is free time to look at their old procedures, so decided to organize the program out, and share with you.
Here is a specific program to write the module, first you need to create a project (the name is determined by yourself):
1. Add two modules, here I give them respectively named Modapi, Modmain;
2. Add three forms, where I named them respectively Frmmain, Frmlogin, Frmaddinfo;
3. The following is the source code content of each module, please save the project, and then go to the project folder, the following prompts for the source copy;
Use Notepad to open the Frmmain.frm file, copy the following:
MsgBox "This package information is incomplete, or not" Business Channel System File Update "Package! "& VbCrLf & vbCrLf &" Decompression is not completed, please request the latest update package! ",, App.EXEName
' Delete the replication package under the System installation directory
Kill Cab_filename
Exit Sub
Else
SetAttr FileName, Vbnormal
End If
Screen.MousePointer = 11
' Extract information
FileNum = CLng (CLng (readinifile (filename, number of files, FileNum))
ReDim S_filenames (FileNum)
ReDim D_filenames (FileNum)
' Where S_filenames's last data is the playback information file
MsgBox "This package information is incomplete, or not" Business Channel System File Update "Package! "& VbCrLf & vbCrLf &" Decompression is not completed, please request the latest update package! ",, App.EXEName
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.