Results 1 to 3 of 3

Thread: scan an app for a pixel of a certain color

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Mar 2001
    Posts
    17
    could some show an example on how to
    scan the pixelarea of a program for a pixel with a certain color?

    thanks in advance, help is heavily appreciated!

  2. #2
    Megatron
    Guest
    Code:
    Private Declare Function GetPixel Lib "gdi32" Alias "GetPixel" (ByVal hdc As Long, ByVal x As Long, ByVal y As Long) As Long
    
    Private Sub Command1_Click()
    
        For x = 1 To Width / Screen.TwipsPerPixelX
            For y = 1 To Width / Screen.TwipsPerPixelY
                lColor = GetPixel(Me.hDC, X, Y)
                If lColor = vbBlue Then MsgBox "Blue found"
            Next y
        Next x
    
    End Sub

  3. #3

    Thread Starter
    Junior Member
    Join Date
    Mar 2001
    Posts
    17

    thx man!!

    luv yah! it w0rx
    luv yah! it w0rx
    luv yah! it w0rx
    luv yah! it w0rx
    luv yah! it w0rx

    and thanks again )))

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