Here's what i have : a simple windows forms application with a PictureBox and a TrackBar.
So here's what i want : i want to be able to put any jpeg or png in the resources and refer to them by the TrackBar1.Value
without having to specify their names 1 by 1 in a string array.
The only way i see is to refer somehow to an array containing what's in the Resources.
See, i've came up with this code wich works fine :
Dim list() As String = {"2013-04-03 22.53.41", "2013-04-10 12.43.47",
"2013-05-24 01.44.00", "2013-05-25 11.49.51", "2013-05-25 16.37.10",
"2013-06-06 23.22.46", "2013-07-04 19.59.29", "2013-09-14 12.31.09",
"2013-11-20 20.28.07", "2014-01-03 15.30.21", "2014-01-24 20.12.16",
"2014-03-18 19.03.21", "2014-05-27 20.40.07", "2014-07-21 19.46.37",
"2014-08-05 14.05.09", "2014-09-01 17.41.46", "2014-09-01 22.13.08",
"2014-09-14 17.49.31", "2014-09-15 17.27.55", "2015-05-30 12.45.58"}
' These are 19 iPhone pictures
Private Sub TrackBar1_Scroll(sender As Object, e As EventArgs) Handles TrackBar1.Scroll
picbox.Image = CType(My.Resources.ResourceManager.GetObject(list(TrackBar1.Value)), Image)
End Sub
But that way, i have to manually type the names in a string array...
Thanks a lot.