省略了一些 Private Sub Listfile(DirStr As String) If Not Inet1.StillExecuting Then OperationStyle = 1 Inet1.Execute , "LS " & DirStr End If End SubPrivate Sub Inet1_StateChanged(ByVal State As Integer) Select Case State Case 12 'icResponseCompleted Select Case OperationStyle Case 1 '列出目录和文件 InetData = Inet1.GetChunk(1024, 0) '0表示把数据作为字符串来检索,1表示把数据作为字节数组来检索 If Trim(InetData) <> 0 Then tempArray = Split(InetData, vbCrLf, , vbTextCompare) Combo2.Text = "Root/" & CurrentServerDir i = 0 Do While i < UBound(tempArray) If tempArray(i) <> "" Then debug.print (tempArray(i)) End If i = i + 1 Loop ListIndex = 1 End If
Private Sub Listfile(DirStr As String)
If Not Inet1.StillExecuting Then
OperationStyle = 1
Inet1.Execute , "LS " & DirStr
End If
End SubPrivate Sub Inet1_StateChanged(ByVal State As Integer)
Select Case State
Case 12 'icResponseCompleted
Select Case OperationStyle
Case 1 '列出目录和文件
InetData = Inet1.GetChunk(1024, 0) '0表示把数据作为字符串来检索,1表示把数据作为字节数组来检索
If Trim(InetData) <> 0 Then
tempArray = Split(InetData, vbCrLf, , vbTextCompare)
Combo2.Text = "Root/" & CurrentServerDir
i = 0
Do While i < UBound(tempArray)
If tempArray(i) <> "" Then
debug.print (tempArray(i))
End If
i = i + 1
Loop
ListIndex = 1
End If