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. Invert RBG into a color variable in vb.NET

Invert RBG into a color variable in vb.NET

Scheduled Pinned Locked Moved Visual Basic
csharpquestion
3 Posts 2 Posters 1 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.
  • R Offline
    R Offline
    Romein
    wrote on last edited by
    #1

    I need to set new color variable which contains a specific color that I created... I got its R/B/G values, How can I make a color variable called x that contain it... and then If I have a button and I want 2 chnage its color I will use: Button1.backcolor=x Thank You Very much :confused:

    R 1 Reply Last reply
    0
    • R Romein

      I need to set new color variable which contains a specific color that I created... I got its R/B/G values, How can I make a color variable called x that contain it... and then If I have a button and I want 2 chnage its color I will use: Button1.backcolor=x Thank You Very much :confused:

      R Offline
      R Offline
      Roger Alsing 0
      wrote on last edited by
      #2

      ok , i didnt quite get what you write in the message. to create a color from rgb: Color c=Color.FromArgb(r,g,b); to invert a color: Color inv=Color.FromArgb(255-c.R,255-c.G,255-c.B); (ps , that was c# code , but i just assumed your usinng vb.net?) //Roger

      R 1 Reply Last reply
      0
      • R Roger Alsing 0

        ok , i didnt quite get what you write in the message. to create a color from rgb: Color c=Color.FromArgb(r,g,b); to invert a color: Color inv=Color.FromArgb(255-c.R,255-c.G,255-c.B); (ps , that was c# code , but i just assumed your usinng vb.net?) //Roger

        R Offline
        R Offline
        Romein
        wrote on last edited by
        #3

        :-D

        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