rgb colors in vb.net

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • reidarT

    #1

    rgb colors in vb.net

    I want to change the background color on a panel when mouse over and when
    mouse leave.
    If I use ..background.co lor.lightgreen it works OK, but I want to use
    ....background. color.rgb(x,y,z ) but it doesn't work
    reidarT


  • Stuart Nathan

    #2
    Re: rgb colors in vb.net

    try color.toargb


    Comment

    • gene kelley

      #3
      Re: rgb colors in vb.net

      On Tue, 29 Aug 2006 21:29:17 +0200, "reidarT" <reidar@eivon.n owrote:
      >I want to change the background color on a panel when mouse over and when
      >mouse leave.
      >If I use ..background.co lor.lightgreen it works OK, but I want to use
      >...background. color.rgb(x,y,z ) but it doesn't work
      >reidarT
      >
      Don't know about background.colo r...but for the BackColor try:
      Me.Panel1.BackC olor = Color.FromArgb( r,g,b)

      Gene

      Comment

      • Peter Proost

        #4
        Re: rgb colors in vb.net

        I would use color.FromArgb( )

        ;-)

        Greetz, Peter

        --
        Programming today is a race between software engineers striving to build
        bigger and better idiot-proof programs, and the Universe trying to produce
        bigger and better idiots. So far, the Universe is winning. (Rich Cook)

        "Stuart Nathan" <stuart.nathan@ homecall.co.uks chreef in bericht
        news:#hzHPQ6yGH A.4932@TK2MSFTN GP02.phx.gbl...
        try color.toargb
        >
        >

        Comment

        • Stuart Nathan

          #5
          Re: rgb colors in vb.net

          of course FromArgb but you need to specify the Alpha channel - 255 if solid


          Comment

          • gene kelley

            #6
            Re: rgb colors in vb.net

            On Wed, 30 Aug 2006 17:03:33 +0100, "Stuart Nathan" <stuart.nathan@ homecall.co.ukw rote:
            >of course FromArgb but you need to specify the Alpha channel - 255 if solid
            >
            No, not really. There are four overrides for the method. When using FromArgb(r,g,b) , the Alpha
            value, 255, is implicit.

            Gene

            Comment

            Working...