12/02/07 22:54
Ciao a tutti sto realizzando un progettino, Client / Server.
Nel Server ho impostato un Combo, un Drive, un Dir e un File..
Due List1, List2
Option Explicit
Dim k, d, f As Integer
Dim Drive(0 To 100) As String
Dim file(0 To 200) As String
Dim dir(0 To 150) As String
Private Sub Combo1_Click()
On Error GoTo error
Drive1.Drive = Combo1.List(Combo1.ListIndex)
error:
End Sub
Private Sub Dir1_Change()
On Error Resume Next
File1.Path = Dir1.Path
Call Aggiorna
End Sub
Private Sub Drive1_Change()
On Error GoTo error_handler
Dir1.Path = Drive1.Drive
error_handler:
End Sub
Private Sub Aggiorna()
List1.Clear
List2.Clear
For k = 0 To (Drive1.ListCount - 1)
Drive(k) = Drive1.List(k)
Combo1.List(k) = Drive(k)
Next k
List1.AddItem (".."
For d = 0 To (Dir1.ListCount - 1)
dir(d) = Dir1.List(d)
List1.List(d + 1) = dir(d)
Next d
For f = 0 To (File1.ListCount - 1)
file(f) = File1.List(f)
List2.List(f) = file(f)
Next f
End Sub
Private Sub Form_Load()
Call Aggiorna
End Sub
Private Sub List1_dblClick()
On Error GoTo error
Dir1.Path = List1.List(List1.ListIndex)
error:
End Sub
Nel List1 mi visualizza tutte le directory.. e nel List2 i files!
Uso Winsock.. Ovvio.. ma vorrei capirne di +
Per inviare la List1 al Client, in che modo posso farlo?
Qualcuno mi può dare una mano..
grazie..
Nel Server ho impostato un Combo, un Drive, un Dir e un File..
Due List1, List2
Option Explicit
Dim k, d, f As Integer
Dim Drive(0 To 100) As String
Dim file(0 To 200) As String
Dim dir(0 To 150) As String
Private Sub Combo1_Click()
On Error GoTo error
Drive1.Drive = Combo1.List(Combo1.ListIndex)
error:
End Sub
Private Sub Dir1_Change()
On Error Resume Next
File1.Path = Dir1.Path
Call Aggiorna
End Sub
Private Sub Drive1_Change()
On Error GoTo error_handler
Dir1.Path = Drive1.Drive
error_handler:
End Sub
Private Sub Aggiorna()
List1.Clear
List2.Clear
For k = 0 To (Drive1.ListCount - 1)
Drive(k) = Drive1.List(k)
Combo1.List(k) = Drive(k)
Next k
List1.AddItem (".."
For d = 0 To (Dir1.ListCount - 1)
dir(d) = Dir1.List(d)
List1.List(d + 1) = dir(d)
Next d
For f = 0 To (File1.ListCount - 1)
file(f) = File1.List(f)
List2.List(f) = file(f)
Next f
End Sub
Private Sub Form_Load()
Call Aggiorna
End Sub
Private Sub List1_dblClick()
On Error GoTo error
Dir1.Path = List1.List(List1.ListIndex)
error:
End Sub
Nel List1 mi visualizza tutte le directory.. e nel List2 i files!
Uso Winsock.. Ovvio.. ma vorrei capirne di +
Per inviare la List1 al Client, in che modo posso farlo?
Qualcuno mi può dare una mano..
grazie..
Ultima modifica effettuata da 12/02/07 22:57