Click here to Skip to main content
15,909,466 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I am not getting the preview of ftp image in picture box.

What I have tried:

VB
Dim str As String = "ftp://ftp.sonataindia.com//smart/" & cmbbranch.SelectedItem & "/" & ListBox1.SelectedItem
            PictureBox1.LoadAsync(str)
            btn_approval.Enabled = True
Posted
Updated 8-Sep-16 0:15am
v2
Comments
Herman<T>.Instance 8-Sep-16 5:45am    
Do you download the file?
neeraj_ 8-Sep-16 5:58am    
no sir
i just want a preview in picture box
Herman<T>.Instance 8-Sep-16 6:05am    
where is that picture?
neeraj_ 8-Sep-16 6:43am    
on ftp sir
Path is- ftp://ftp.sonataindia.com//smart
Herman<T>.Instance 8-Sep-16 7:36am    
LoadAsync, isn't that meant for local files? For FTP you have to use FtpRequest class. You have transfer these bits and bytes first.

1 solution

See PictureBox.LoadAsync Method (String) (System.Windows.Forms)[^], it suggests that the URL needs to be to a HTTP server, rather than ftp.
 
Share this answer
 
Comments
neeraj_ 8-Sep-16 6:38am    
NOT WORKING SIR :(
Richard MacCutchan 8-Sep-16 6:58am    
Well thanks for sharing that.
neeraj_ 8-Sep-16 6:58am    
:(

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900