Results 1 to 4 of 4

Thread: questions on rgb/argb

Threaded View

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Oct 2009
    Posts
    376

    questions on rgb/argb

    Q1. is there a way to set an argb value to a Control?
    Code:
        Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
            Me.AllowTransparency = True
            Me.BackColor = Color.FromArgb(155, 255, 0, 0)
        End Sub
    i get error when setting BackColor "control does not support tarnsparent background colors"

    Q2. is there any difference between this 2:
    argb(255,0,0,127) "opacity is 1, blue is half" and
    argb(127,0,0,255) "opacity is half, blue is max"

    Q3. what if there are rounding off errors in the conversion to/from argb/rgb
    say argb(200,0,0,150) when converted to 255 opacity i get (255,0,0,117.5585938~)
    can i say that argb(255,0,0,118) is exactly equal to argb(200,0,0,150) or is argb(255,0,0,117) exactly equal to argb(200,0,0,150), or is there no way to exactly convert argb(200,0,0,150) to a value with alpha at 255?

    Q4. is it true that there is absolutely no relation between argb and rgb, because the actual rgb value of an argb depends on the color of the element behind it
    Last edited by pacerier; Dec 14th, 2009 at 10:01 AM.

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