Get list of all colors in vb.net
Channel:
Subscribers:
6,800
Published on ● Video Link: https://www.youtube.com/watch?v=Wllt5-WiEYA
Code:
Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
For Each i In GetType(System.Drawing.Color).GetProperties(Reflection.BindingFlags.Public Or Reflection.BindingFlags.Static)
ListBox1.Items.Add(i.Name)
Next
End Sub
Private Sub ListBox1_SelectedIndexChanged(sender As Object, e As EventArgs) Handles ListBox1.SelectedIndexChanged
Try
Me.BackColor = Color.FromName(ListBox1.SelectedItem)
Catch ex As Exception
End Try
End Sub
#vb.net
#Visual_Studio
نتمنى منكم زيارة موقعنا الالكتروني
http://math2020king.blogspot.com https://mathsry.blogspot.com/