Results 1 to 10 of 10
  1. #1
    arcanan's Avatar
    Join Date
    Feb 2011
    Gender
    male
    Location
    Cyprus
    Posts
    69
    Reputation
    -7
    Thanks
    5

    [Help] RGB [solved]

    Hey guys, i want to make a prog that u choose the colour and gives you the RGB numbers, anyone can help ?:P

  2. #2
    Hassan's Avatar
    Join Date
    May 2010
    Gender
    male
    Location
    System.Threading.Tasks
    Posts
    4,764
    Reputation
    495
    Thanks
    2,133
    My Mood
    Dead
    [highlight=vbnet]Private Sub PictureBox1_MouseMove(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles PictureBox1.MouseMove
    Dim x As Bitmap = PictureBox1.Image
    Dim ref As Color = x.GetPixel(e.X, e.Y)
    Dim rVal As Integer = ref.R
    Dim gVal As Integer = ref.G
    Dim bVal As Integer = ref.B
    End Sub[/highlight]


  3. The Following User Says Thank You to Hassan For This Useful Post:

    arcanan (03-31-2011)

  4. #3
    Lyoto Machida's Avatar
    Join Date
    Jan 2011
    Gender
    male
    Location
    Far away with girls
    Posts
    3,734
    Reputation
    133
    Thanks
    1,621
    My Mood
    Aggressive
    Good Job hassan, that was fast

  5. #4
    ³²³'s Avatar
    Join Date
    Mar 2011
    Gender
    male
    Location
    sef
    Posts
    302
    Reputation
    9
    Thanks
    19
    My Mood
    Angelic
    hassan's code doesn't work

    Parameter must be positive and < Height. Parameter name: y

    edit: it only works when you wait for the controls to load, so put this code on mousedown.

    edit2: still doesn't work on mouse down. worked for a few seconds though...
    Last edited by ³²³; 03-30-2011 at 02:25 PM.

    Quote Originally Posted by $0WhaT ?
    Hey sherlock u cant put a keygen on a .php
    Quote Originally Posted by ³²³
    Keygen.php is not a valid vBulletin file. It's there for cracking purposes
    Quote Originally Posted by $0WhaT ?
    Maybe but idc it doesn mean i am a keylogger

  6. #5
    Blubb1337's Avatar
    Join Date
    Sep 2009
    Gender
    male
    Location
    Germany
    Posts
    5,915
    Reputation
    161
    Thanks
    3,108
    @³²³ ,I wrote up two functions for you, use the one you prefer:

    [highlight="VB.Net"] Private Function GetRGB(ByVal color As System.Drawing.Color) As List(Of Byte)
    Dim rByte As New List(Of Byte)
    rByte.Add(color.R)
    rByte.Add(color.B)
    rByte.Add(color.G)

    Return rByte
    End Function

    Private Function GetRGBString(ByVal color As System.Drawing.Color, ByVal delimiter As Char) As String
    Return String.Concat(color.R, delimiter, color.G, delimiter, color.B)
    End Function
    End Class[/highlight]



  7. The Following 2 Users Say Thank You to Blubb1337 For This Useful Post:

    arcanan (03-31-2011),Lyoto Machida (03-31-2011)

  8. #6
    ³²³'s Avatar
    Join Date
    Mar 2011
    Gender
    male
    Location
    sef
    Posts
    302
    Reputation
    9
    Thanks
    19
    My Mood
    Angelic
    Thanks, even though I don't really need it just trying to help the op

  9. #7
    arcanan's Avatar
    Join Date
    Feb 2011
    Gender
    male
    Location
    Cyprus
    Posts
    69
    Reputation
    -7
    Thanks
    5
    ill try it later thanks anw

  10. #8
    Jason's Avatar
    Join Date
    Apr 2010
    Gender
    male
    Location
    /dev/null
    Posts
    5,704
    Reputation
    918
    Thanks
    7,676
    My Mood
    Mellow
    Kevin's one is the simplest method. You can just use the R, G and B properties of the Color class straight up and that's your RGB.

    Quote Originally Posted by Jeremy S. Anderson
    There are only two things to come out of Berkley, Unix and LSD,
    and I don’t think this is a coincidence
    You can win the rat race,
    But you're still nothing but a fucking RAT.


    ++Latest Projects++
    [Open Source] Injection Library
    Simple PE Cipher
    FilthyHooker - Simple Hooking Class
    CLR Injector - Inject .NET dlls with ease
    Simple Injection - An in-depth look
    MPGH's .NET SDK
    eJect - Simple Injector
    Basic PE Explorer (BETA)

  11. The Following User Says Thank You to Jason For This Useful Post:

    arcanan (03-31-2011)

  12. #9
    arcanan's Avatar
    Join Date
    Feb 2011
    Gender
    male
    Location
    Cyprus
    Posts
    69
    Reputation
    -7
    Thanks
    5
    ah ok thanks everybody

  13. #10
    Jason's Avatar
    Join Date
    Apr 2010
    Gender
    male
    Location
    /dev/null
    Posts
    5,704
    Reputation
    918
    Thanks
    7,676
    My Mood
    Mellow
    Marked as solved then

    Quote Originally Posted by Jeremy S. Anderson
    There are only two things to come out of Berkley, Unix and LSD,
    and I don’t think this is a coincidence
    You can win the rat race,
    But you're still nothing but a fucking RAT.


    ++Latest Projects++
    [Open Source] Injection Library
    Simple PE Cipher
    FilthyHooker - Simple Hooking Class
    CLR Injector - Inject .NET dlls with ease
    Simple Injection - An in-depth look
    MPGH's .NET SDK
    eJect - Simple Injector
    Basic PE Explorer (BETA)