好不容易从网上下了个UnRar,代码如下,可它只能解压文件,可我的压缩包里是个文件夹套文件夹然后才是文件(压缩包—第一层文件夹—第二层文件夹—文件),这个代码该怎么改呀,请高手赐教,谢谢。
Private Declare Function ShellExecute Lib "shell32.dll" Alias "ShellExecuteA" (ByVal hWnd As Long, ByVal lpOperation As String, ByVal lpFile As String, ByVal lpParameters As String, ByVal lpDirectory As String, ByVal nShowCmd As Long) As Long
Option Explicit
Private Sub Command1_Click()
List1.Clear
If fso.FileExists(Text1.Text) = False Then
MsgBox "File doesn't exist !"
Exit Sub
End If
If Option1(0).Value = True Then
UnRar1.Lister Text1.Text
Else
UnRar1.Decompress Text1.Text, Foldr
End If
End Sub
Private Sub Command2_Click()
ShellExecute Me.hWnd, "Open", "mailto:leturk@netcoier.com", "", "", 1
End Sub
Private Sub Option1_Click(Index As Integer)
If Index = 1 Then Foldr = InputBox("Please enter the folder to Decompress in :", , "c:\windows\temp")
End Sub
Private Sub UnRar1_Progression(Pourcent As Integer)
ProgressBar1.Value = Pourcent
End Sub
Private Sub UnRar1_RarFileChange(FichierEnCours As UnRarOCX.RarFile)
List1.AddItem FichierEnCours.NomFichier
End Sub