Hej!Winsock, fildelnings program
Jag håller på att bygga ett ftp program i Vb, man ska kunna koppla upp sig mot nån annan ungefär som direct connect och få fram alla diskar, mappar & filer & sedan kunna ladda ner dn fil man valt, men jag lyckas inte få fram alla drivers i drive1 från servern. Så här ser koden ut:
Dim filer As String
Dim filer2 As String
Option Explicit
Private Sub Command1_Click()
Txt.Text = "Ansluter..." + vbCrLf
sckmail.RemoteHost = server.Text
sckmail.RemotePort = port.Text
sckmail.Connect
End Sub
Private Sub Command2_Click()
End Sub
Private Sub Command3_Click()
sckmail.Close
End Sub
Private Sub Dir1_Change()
File1.Path = Dir1.Path
End Sub
Private Sub Drive1_Change()
Dir1.Path = Drive1.Drive
End Sub
Private Sub Form_DragOver(Source As Control, X As Single, Y As Single, State As Integer)
Text1.Text = filer
File2.Path = filer2
End Sub
Private Sub sckmail_DataArrival(ByVal bytesTotal As Long)
Dim A As String
sckmail.GetData A
Txt.Text = Txt.Text + A
End Sub
Private Sub sckmail_Connect()
sckmail.SendData ("anonymous" + vbCrLf)
sckmail.SendData ("osten" + vbCrLf)
sckmail.SendData ("quit" + vbCrLf)
Dim List As String
filer = sckmail.RemoteHostIP
Text1.Text = filer
End Sub
Hej då