Results 1 to 7 of 7

Thread: Effects of various RGBA values

  1. #1

    Thread Starter
    New Member
    Join Date
    Dec 2003
    Posts
    4

    Angry Effects of various RGBA values

    Hi everyone.
    well, i have this exercise where i have to show the effects of various RGBA values on the color produced.
    i got 4 scroll bars for the red, green, blue, and alpha values respectively. I have to displya the output color in a filled rectangle each time the user changes the value of one the scroll bars.
    i already create the rectangle, but i dont know how to change the color...of the rectangle with the scroll bars...

    well guys, i hope u can help me!

    thanks ahead!

  2. #2
    Frenzied Member
    Join Date
    Oct 2002
    Location
    Gammapolis
    Posts
    1,474
    set the color to: Color.FromArgb(alpha,red,green,blue) where alpha, red, green, blue are 0-255 integers.
    'Heading for the automatic overload'
    Marillion, Brave, The Great Escape, 1994

    'How will WE stand the FIRE TOMORROW?'
    Eloy, Silent Cries and Mighty Echoes, The Vision - Burning, 1979

  3. #3

    Thread Starter
    New Member
    Join Date
    Dec 2003
    Posts
    4
    thanks,
    but i already did that, ,
    the thing is to change the color in the rectangle!...
    ....


    thanks.

  4. #4
    Frenzied Member
    Join Date
    Oct 2002
    Location
    Gammapolis
    Posts
    1,474
    Fill it with new color.
    'Heading for the automatic overload'
    Marillion, Brave, The Great Escape, 1994

    'How will WE stand the FIRE TOMORROW?'
    Eloy, Silent Cries and Mighty Echoes, The Vision - Burning, 1979

  5. #5

    Thread Starter
    New Member
    Join Date
    Dec 2003
    Posts
    4
    but that's the thing...
    how??
    i have no idea how to do it...

    thanks...

  6. #6
    Frenzied Member
    Join Date
    Oct 2002
    Location
    Gammapolis
    Posts
    1,474
    How you draw a rectangle? do you know that? The same way you can file a rectangle. For example in a paint event:
    VB Code:
    1. Dim br As New SolidBrush(Color.FromArgb(a, r, g, b))
    2. e.Graphics.FillRectangle(br, New RectangleF(0, 0, 100, 100))
    'Heading for the automatic overload'
    Marillion, Brave, The Great Escape, 1994

    'How will WE stand the FIRE TOMORROW?'
    Eloy, Silent Cries and Mighty Echoes, The Vision - Burning, 1979

  7. #7

    Thread Starter
    New Member
    Join Date
    Dec 2003
    Posts
    4
    Thanks for your help
    , ,
    i really appreciate...it.

    take caer...

    see ya

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