Dim r As Boolean 'R分量
Dim g As Boolean
Dim b As Boolean
For X = 0 To tDBmpInfo.bmWidth - 1
For y = 0 To tDBmpInfo.bmHeight - 1
c1 = Image1.Point(X, y)
r = c1 And &HFF
g = (c1 And 65280) / 256
b = (c1 And &HFF0000) / 65536
If r = True And g = False And b = False Then
Label1.Caption = X
Label2.Caption = y
Exit For
End If