VB中实现查找颜色的函数是什么 ?

来源:百度知道 编辑:UC知道 时间:2024/07/04 11:21:15
如题 VB中实现查找 给定句柄 坐标 颜色值 查这个点上颜色是否是前面给定颜色值 类似VBS中FindColorEx() 最好是能实现后台找色的 就是我把窗口最小化了 也能按相对坐标找到的 谢谢
如果可以 多写点 我笨 呵呵

Public Function GetRValue(lngColor As Long) As Byte
GetRValue = Val("&H" & Right(Hex(lngColor), 2))
End Function

Public Function GetGValue(lngColor As Long) As Byte
GetGValue = Val("&H" & Mid(Format(Hex(lngColor), "#000000"), 3, 2))
End Function

Public Function GetBValue(lngColor As Long) As Byte
GetBValue = Val("&H" & Left(Format(Hex(lngColor), "#000000"), 2))
End Function

给你一个查找颜色的源码实例,请下载:
http://www.fileurls.com/download.ashx?id=hsxvin