Come riempire una listbox con i colori di sistema. How to fill a listbox with system colors
Dim colors_ As List(Of String)
colors_ = GetColors()
Dim f As Integer
Dim L As Integer
L = colors_.Count
For f = 0 To L - 1
ListBoxColori.Items.Add(colors_(f))
Next
Public Function GetColors() As List(Of String)
'Ottiene una lista delle strutture interne e Color
Dim Members As Reflection.PropertyInfo() = GetType(Color).GetProperties()
Dim Result As New List(Of String)
'Ottiene il nome delle proprietà
For Each P As Reflection.PropertyInfo In Members
Result.Add(P.Name)
Next
Return Result
End Function