Results 1 to 11 of 11

Thread: [RESOLVED] help: find a pixel on screen by its color

Threaded View

  1. #7
    PoorPoster iPrank's Avatar
    Join Date
    Oct 2005
    Location
    In a black hole
    Posts
    2,729

    Re: help: find a pixel on screen by its color

    Quote Originally Posted by Cipherman
    when i run the below code. the returned color is 16382453
    however i dont know what that means
    i tried spliting it up into RGB but that didtn work cas it went over 255
    163 824 53
    163 82 453
    16 382 453
    so what does 16382453 mean?
    thx
    colors in Windows (or VB) is represented by Long integers (32bit).
    The value 16382453 (or F9F9F5 in Hex) is the value of this color.

    After the debug.print line add,
    Me.BackColor = color
    it will change the form's background color to the color of the specified pixel.

    For VB's long to RGB conversion, you'll need to extract each color from the long value.
    There are many example on the web: http://www.google.com/search?client=...utf-8&oe=utf-8
    Last edited by iPrank; Aug 26th, 2006 at 04:14 AM.
    Usefull VBF Threads/Posts I Found . My flickr page .
    "I love being married. It's so great to find that one special person you want to annoy for the rest of your life." - Rita Rudner


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