If your images are stored as resources you can use the following to query their names
Code:Private Sub Button1_Click( _ ByVal sender As System.Object, _ ByVal e As System.EventArgs) _ Handles Button1.Click Dim MyProperties As System.Reflection.PropertyInfo() = GetType(My.Resources.Resources).GetProperties(System.Reflection.BindingFlags.NonPublic Or System.Reflection.BindingFlags.Instance Or System.Reflection.BindingFlags.Static) Dim BitMaps = (From T In MyProperties Where T.PropertyType Is GetType(Bitmap)).ToList For Each bm In BitMaps Console.WriteLine(bm.Name) Next End Sub




Reply With Quote