Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. Visual Basic
  4. How can i add system colors with corresponding colorname in combo box using Vb.net

How can i add system colors with corresponding colorname in combo box using Vb.net

Scheduled Pinned Locked Moved Visual Basic
csharphelpquestion
1 Posts 1 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • D Offline
    D Offline
    Deepthy P M
    wrote on last edited by
    #1

    I am using vb.net.I want to add system colors with color name in combo box.I can add system color name in combo box .The code is given below **************** Private Sub btGet_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btGet.Click Dim color As Color Dim i As Integer For Each color In System.ComponentModel.TypeDescriptor.GetConverter(GetType(Color)).GetStandardValues() i += 1 ComboBox1.Items.Add(color.ToKnownColor) Next Label1.Text = "Total Color Count: " & i ComboBox1.SelectedIndex = 0 Me.BackColor = color.FromKnownColor(ComboBox1.SelectedItem) End Sub Private Sub ComboBox1_SelectedIndexChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles ComboBox1.SelectedIndexChanged Try Me.BackColor = Color.FromKnownColor(ComboBox1.SelectedItem) Catch ex As Exception Application.Exit() End Try End Sub **************** I want to add color also.How can i do this .If anyone know the code pls help me. :(

    1 Reply Last reply
    0
    Reply
    • Reply as topic
    Log in to reply
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes


    • Login

    • Don't have an account? Register

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • World
    • Users
    • Groups