Hello,
I am trying to realize a very simple FTP slide show by means of B4PPC6.5:
Sub App_Start
Form1.Show
ftp.New1
ftp.Open("ftp.softronics.ch","hlgast","hlg001")
ftp.SetCurrentDirectory("public")
For n = 1 To 3
fn = n & ".jpg"
ftp.GetFile(fn,AppPath & "\tmp.jpg") ' --> Error for n=2 !
Image1.Image = AppPath & "\tmp.jpg"
Image1.Refresh
Sleep (1000)
Image1.Dispose
'FileDel(AppPath & "\tmp.jpg") ' ---> impossible !
Next n
End Sub
The loop fails at n = 2 because "tmp.jpg" isn't released by the Image1.Image method.
Without showing the Image the loop is ending normally. The only possibility to access the tmp.jpg file (e.g. to delete it) is to cancel the program first.
Please help!
I am trying to realize a very simple FTP slide show by means of B4PPC6.5:
Sub App_Start
Form1.Show
ftp.New1
ftp.Open("ftp.softronics.ch","hlgast","hlg001")
ftp.SetCurrentDirectory("public")
For n = 1 To 3
fn = n & ".jpg"
ftp.GetFile(fn,AppPath & "\tmp.jpg") ' --> Error for n=2 !
Image1.Image = AppPath & "\tmp.jpg"
Image1.Refresh
Sleep (1000)
Image1.Dispose
'FileDel(AppPath & "\tmp.jpg") ' ---> impossible !
Next n
End Sub
The loop fails at n = 2 because "tmp.jpg" isn't released by the Image1.Image method.
Without showing the Image the loop is ending normally. The only possibility to access the tmp.jpg file (e.g. to delete it) is to cancel the program first.
Please help!