View Single Post
 
Old July 31st, 2005, 07:08 PM
vb certified vb certified is offline
Authorized User
 
Join Date: May 2005
Location: , , .
Posts: 36
Thanks: 0
Thanked 0 Times in 0 Posts
Default WHY DOESNT THIS WORK

Dim pixelColor As Color
        Dim x As Integer
        Dim y As Integer

        Do
            pixelColor = myBitmap.GetPixel(x, y)
            Label1.BackColor = pixelColor
            If pixelColor = Color.Red Then
                MsgBox("YOU FOUND COLOR AT " & x & " " & y & "!")
                Exit Do
            End If
            x += 1
            If x = myBitmap.Width Then
                x = 0
                y += 1
            End If
        Loop Until y = myBitmap.Height
the loop works very well except the code has a problem with the
If pixelColor = Color.Red Then
                MsgBox("YOU FOUND COLOR AT " & x & " " & y & "!")
                Exit Do
            End If
it has trouble with the first line. I cant remember what i can use to check wheter a color matches a color. EX
IF color1 = color2 then
dosomthing
end if
Any help is wonderful help

~~~~~~~~~~~~~~~~~~~~~
I'm sorry for having a rude signature Peter. I'm sorry for having a rude signature Peter. I'm sorry for having a rude signature Peter. I'm sorry for having a rude signature Peter. I'm sorry for having a rude signature Peter. I'm sorry for having a rude signature Peter. I'm sorry for having a rude signature Peter. I'm sorry for having a rude signature Peter. I'm sorry for having a rude signature Peter. I'm sorry for having a rude signature Peter.
__________________
~~~~~~~~~~~~~~~~~~~~~
I\'m sorry for having a rude signature Peter. I\'m sorry for having a rude signature Peter. I\'m sorry for having a rude signature Peter. I\'m sorry for having a rude signature Peter. I\'m sorry for having a rude signature Peter. I\'m sorry for having a rude signature Peter. I\'m sorry for having a rude signature Peter. I\'m sorry for having a rude signature Peter. I\'m sorry for having a rude signature Peter. I\'m sorry for having a rude signature Peter.