If ftp0.Connect Then Messagebox.Show(ftp0.host + "该服务器可用") For iy As Integer = 1 To 3 Dim ftp1 As New FTPClient ftp1.host =ftp0.host ftp1.Account = ftp0.Account ftp1.password = ftp0.password e.Form.Controls("PictureViewer" & iy).FTPclient = ftp1 msgbox(ftp1.host + "PictureViewer" & iy ) msgbox(ftp1.Account) msgbox(ftp1.password ) Nextexit for
Else
Messagebox.Show(ftp0.host + "该服务器不可用")
End If