5 个解决方案
#1
你真的要是 跪在大家面前也许有人会给你答案的
查找指定的颜色你只有一个一个的去比较。
查找指定的颜色你只有一个一个的去比较。
#2
'添加 Command1 Picture1
Private Declare Function GetPixel Lib "gdi32" (ByVal hDC As Long, ByVal X As Long, ByVal Y As Long) As Long
Dim SchColor&
Private Sub Form_Load()
Picture1.ScaleMode = 3
SchColor = 0 '找黑色
End Sub
Private Sub Command1_Click()
Dim X1&, Y1&
For X1 = 0 To Picture1.Width
For Y1 = 0 To Picture1.Height
If GetPixel(Picture1.hDC, X1, Y1) = SchColor Then MsgBox CStr(X1) & "," & CStr(Y1): Exit Sub
Next Y1
Next X1
End Sub
Private Declare Function GetPixel Lib "gdi32" (ByVal hDC As Long, ByVal X As Long, ByVal Y As Long) As Long
Dim SchColor&
Private Sub Form_Load()
Picture1.ScaleMode = 3
SchColor = 0 '找黑色
End Sub
Private Sub Command1_Click()
Dim X1&, Y1&
For X1 = 0 To Picture1.Width
For Y1 = 0 To Picture1.Height
If GetPixel(Picture1.hDC, X1, Y1) = SchColor Then MsgBox CStr(X1) & "," & CStr(Y1): Exit Sub
Next Y1
Next X1
End Sub
#3
我什么都没看见........
PS:我宁愿用钱买代码也不跪.
PS:我宁愿用钱买代码也不跪.
#4
不好意思:1,我不是计算机专业毕业的; 2.因为确实急需这样的段代码.求成心切,所以说话有点过头.请各位大虾原谅...小弟真的是希望你们能帮我一把```
很感谢你们的指点,问题以得到初步解决,在这里先谢过诸位了```
很感谢你们的指点,问题以得到初步解决,在这里先谢过诸位了```
#5
问题解决了,你应该结贴呀
#1
你真的要是 跪在大家面前也许有人会给你答案的
查找指定的颜色你只有一个一个的去比较。
查找指定的颜色你只有一个一个的去比较。
#2
'添加 Command1 Picture1
Private Declare Function GetPixel Lib "gdi32" (ByVal hDC As Long, ByVal X As Long, ByVal Y As Long) As Long
Dim SchColor&
Private Sub Form_Load()
Picture1.ScaleMode = 3
SchColor = 0 '找黑色
End Sub
Private Sub Command1_Click()
Dim X1&, Y1&
For X1 = 0 To Picture1.Width
For Y1 = 0 To Picture1.Height
If GetPixel(Picture1.hDC, X1, Y1) = SchColor Then MsgBox CStr(X1) & "," & CStr(Y1): Exit Sub
Next Y1
Next X1
End Sub
Private Declare Function GetPixel Lib "gdi32" (ByVal hDC As Long, ByVal X As Long, ByVal Y As Long) As Long
Dim SchColor&
Private Sub Form_Load()
Picture1.ScaleMode = 3
SchColor = 0 '找黑色
End Sub
Private Sub Command1_Click()
Dim X1&, Y1&
For X1 = 0 To Picture1.Width
For Y1 = 0 To Picture1.Height
If GetPixel(Picture1.hDC, X1, Y1) = SchColor Then MsgBox CStr(X1) & "," & CStr(Y1): Exit Sub
Next Y1
Next X1
End Sub
#3
我什么都没看见........
PS:我宁愿用钱买代码也不跪.
PS:我宁愿用钱买代码也不跪.
#4
不好意思:1,我不是计算机专业毕业的; 2.因为确实急需这样的段代码.求成心切,所以说话有点过头.请各位大虾原谅...小弟真的是希望你们能帮我一把```
很感谢你们的指点,问题以得到初步解决,在这里先谢过诸位了```
很感谢你们的指点,问题以得到初步解决,在这里先谢过诸位了```
#5
问题解决了,你应该结贴呀