阿杰屏幕颜色获取工具 V1.0
截图:源码下载:
**** Hidden Message ***** 我也写了一个。呵呵。
Form1.frmPublic Function GetDcPic() As Long
Dim destHdc&, Ret&
Dim Pxy As PointApi
destHdc = GetDC(0)
GetCursorPos Pxy
GetDcPic = BitBlt(PicDest.hdc, 0, 0, PicDest.Width, PicDest.Height, destHdc, Pxy.x, Pxy.y, vbSrcCopy)
PicDest.Refresh
End Function
Public Function GetDcColor() As Double
Dim destHdc&, Ret&
Dim Pxy As PointApi
destHdc = GetDC(0)
GetCursorPos Pxy
GetDcColor = GetPixel(destHdc, Pxy.x, Pxy.y)
Ret& = ReleaseDC(0, destHdc)
End Function
Private Sub Timer1_Timer()
PicColor.BackColor = GetDcColor
Blue.Text = (PicColor.BackColor And &HFF0000) / &H10000
Green.Text = (PicColor.BackColor And &HFF00&) / &H100&
Red.Text = PicColor.BackColor And &HFF&
GetDcPic
End SubModule1.BasPublic Declare Function GetCursorPos Lib "user32" (lpPoint As PointApi) As Long
Public Declare Function GetDC Lib "user32" (ByVal hwnd As Long) As Long
Public Declare Function ReleaseDC Lib "user32" (ByVal hwnd As Long, ByVal hdc As Long) As Long
Public Declare Function GetPixel Lib "gdi32" (ByVal hdc As Long, ByVal x As Long, ByVal y As Long) As Long
Public Declare Function BitBlt Lib "gdi32" (ByVal hDestDC As Long, ByVal x As Long, ByVal y As Long, ByVal nWidth As Long, ByVal nHeight As Long, ByVal hSrcDC As Long, ByVal xSrc As Long, ByVal ySrc As Long, ByVal dwRop As Long) As Long
Public Type PointApi
x As Long
y As Long
End Type
呵呵 ;来看看 谢谢 这个东西不错,一定是又要水晶了,下不来了,看看吧 谢谢分享 感谢大大开源~:loveliness: 正需要这个~
自己不用写了:lol 为什么是易语言的?
lz干嘛不说明下?我还以为vb...... 进来学学习. very好,呵呵。 谢谢分享 这个东西不错 看看 顶。。。。。。。。。。 很好很强大 具 V1.0 [修改]
................................支持你 本帖最后由 wanren2008 于 2012-5-27 15:27 编辑
我用c#刚做了个,实际是抓取屏幕点的句柄、颜色的。
谢谢楼主的分享啊 定定淡定吧 呵呵 ;来看看 谢谢 谢谢LZ 学习一下取色 可以游戏取色吗 学习一下
页:
[1]