有没有免费可靠的解压缩控件?
要求在VB中能调用。
能实现压缩、解压缩、加密码。最好是动态连接库的。
我原来调用RAR.EXE实现,但总感觉不好(DOS方式)。

解决方案 »

  1.   

    http://www.dapha.net/down/list.asp?id=386http://www.dapha.net/down/list.asp?id=378
      

  2.   

    http://www.vbprobe.com/ocx/showdoc.asp?detail_id=447ZIP格式的压缩控件
     
     
      简介:  
     
     
     
     
     本地下载
     操作系统:  | 文件大小: 41KB  | 星级评价:  
      

  3.   

    http://www.vbprobe.com/ocx/default.asp?sub_kind=29
      

  4.   

    这些我都试过不太好,理想的还是FSComprFile.ocx和fszlib.dll搭配,但不能加密码。也不能用rar解压。
    有没有rar的压缩控件?
      

  5.   


    VB中利用WinRAR进行文件压缩  一些数据库文件(如access文件)在远程传输过程中可能由于文件比较大而影响传递效果。如果进行压缩以后再传递,会减少传递时间,避免意外的发生,同时也保证了传递效果。我们在压缩文件时,最常用的压缩工具为winrar和winzip,笔者在vb编程过程中利用winrar工具来压缩数据库文件,并完成远程传输,十分方便,在此向大家介绍一下。用winzip的方法类似。  一、shell函数
      shell函数是vb中的内部函数,它负责执行一个可执行文件,返回一个variant(double),如果成功的话,代表这个程序的进程id,若不成功,则会返回0。  shell的语法:shell(pathname[,windowstyle])。  pathname 为必需参数。类型为string,它指出了要执行的程序名,以及任何需要的参数或命令行变量,也可以包括路径名。  windowstyle为可选参数。integer类型,指定在程序运行时窗口的样式。windowstyle有以下这些值。  常量 值 描述
      vbhide 0 窗口被隐藏,且焦点会移到隐式窗口。
      vbnormalfocus 1 窗口具有焦点,且会还原到它原来的大小和位置。
      vbminimizedfocus 2 窗口会以一个具有焦点的图标来显示(缺省值)。
      vbmaximizedfocus 3 窗口是一个具有焦点的最大化窗口。
      vbnormalnofocus 4 窗口会被还原到最近使用的大小和位置,而当前活动的窗口仍然保持活动。
      vbminimizednofocus 6 窗口会以一个图标来显示,而当前活动的窗口仍然保持活动。  二、关于winrar的用法
      主要介绍以下如何在winrar中用命令行来压缩和解压缩文件。  压缩:winrar a [-switches] [files] [@file lists]  例如你想把try.mdb压缩到c盘下,可以winrar a c:try.rar c:try.mdb  解压缩:如果带目录解压缩     winrar x [-switches] [files] [@file lists] [destionation folder]     如果在当前目录解压缩,即解压缩时不写目录名     winrar e [-switches] [files] [@file lists] [destionation folder]  例如你想把try.rar解压缩到c盘下,可以winrar x c:try.rar c:try.mdb  三、一个例子
      在vb中新建一个工程,在form1中添加两个按钮command1、command2和command3,把他们的caption属性分别设为"压缩文件"、"解压缩文件"和"传递文件"。按command1时把文件try.mdb压缩成try.rar。
    private sub command1_click()   dim rarexe as string ‘winrar执行文件的位置   dim source as string ‘ 压缩前的原始文件   dim target as string ‘ 压缩后的目标文件   dim filestring as string ‘shell指令中的字符串   dim result as long    rarexe="c:program fileswinrarwinrar"   source="c:try.mdb"   target="c:try.rar"   filestring = rarexe & " a " & target & " " & source   result = shell(filestring, vbhide)   end sub   解压的过程类似,按command2可以把try.rar解压生成 try.mdb。在执行了上面的压缩过程后,可以删除文件try.mdb,来解压缩重新生成try.mdb。   private sub command2_click()   dim rarexe as string ‘winrar执行文件的位置   dim source as string ‘ 解压缩前的原始文件   dim target as string ‘ 解压缩后的目标文件   dim filestring as string ‘shell指令中的字符串   dim result as long    rarexe="c:program fileswinrarwinrar"   source="c:try.rar"   target="c:try.mdb"   filestring = rarexe & " x " & source & " " & target   result = shell(filestring, vbhide)   end sub   文件从一台计算机传输到另一台计算机前,应知道另一台计算机的名字,然后用filecopy语句就可以了。假设要把压缩后try.rar传递到计算机名为"other"的共享目录"want"下。   private sub command3_click()   dim sourcefile, destinationfile    sourcefile ="c:try.rar " ‘ 指定源文件名。    destinationfile = "otherwanttry.rar" ‘ 指定目的文件名。    filecopy sourcefile, destinationfile ‘ 将源文件的内容复制到目的文件中。   end sub   怎么样,十分简单吧?
      

  6.   

    我现在用的就是这种方法。而且用的是RAR.EXE直接放在同一文件夹下就可。如果用你这种方法。还要装winrar太麻烦。
      

  7.   

    www.vbgood.com中搜索有不少,有免费的也有自由的(开放源码)