The array is empty at this point.
And yet at the end of the code I’ve set Label1.Text=pic.Count.ToString and I’ve got the value 2
I don’t understand why!
There are two jpegs, presumably.
Yes, there are 2 of them
The objective is to display them in a canva one after the other every 5 seconds, in a loop…
I modified the code, of course it displays the last image, so how can I insert a timer in the loop?
For Each file As FolderItem In f.Children
If Not file.IsFolder Then
If file.Name.Right(5) = “.jpeg” ThenTry Canvas1.Backdrop = Picture.Open(file) Catch e As IOException End Try End If
End If
Next