Try
ftpclient.Initialize("FTP", "ftp.x.net", 21, "x", "x")
ftpclient.TimeoutMs=500
ftpclient.PassiveMode=True
ftpclient.UseSSL=True
Log("FTP Initialized")
ftpclient.UseSSLExplicit=False
If ftpclient.IsInitialized=True Then
Dim ftpdownload As Object = ftpclient.DownloadFile("/x/x/x.jpg",False,main.shared,"a.jpg")
wait for (ftpdownload) FTP_DownloadCompleted (ServerPath As String, Success As Boolean)
If Success=True Then
Log("projects ftp good.")
Else
Log("failed projects ftp downloaded.")
End If
End If
Catch
Log(LastException)
End Try