Results 1 to 5 of 5

Thread: [RESOLVED] VB.Net:How to add all colors in listbox

Hybrid View

  1. #1
    New Member
    Join Date
    Jun 2006
    Posts
    2

    Talking Re: VB.Net:How to add all colors in listbox

    hi softkans,

    try this

    At the top
    Imports System.Reflection

    and then ...

    Dim properties As PropertyInfo() = GetType(System.Drawing.Color).GetProperties(BindingFlags.Static Or BindingFlags.Public)

    Dim color As PropertyInfo
    For Each color In properties
    ListBox1.Items.Add(color.Name)
    Next

    please RESOLVED this post if u got the result

  2. #2

    Thread Starter
    Lively Member softkans's Avatar
    Join Date
    May 2006
    Posts
    70

    Re: VB.Net:How to add all colors in listbox

    Quote Originally Posted by raibow
    hi softkans,

    try this

    At the top
    Imports System.Reflection

    and then ...

    Dim properties As PropertyInfo() = GetType(System.Drawing.Color).GetProperties(BindingFlags.Static Or BindingFlags.Public)

    Dim color As PropertyInfo
    For Each color In properties
    ListBox1.Items.Add(color.Name)
    Next

    please RESOLVED this post if u got the result


    ok raibow.. thanks


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width