取色器,动态给出RGB的值(VB6.0源代码编写)Option Explicit

时间:2012-02-10 11:20:12
【文件属性】:

文件名称:取色器,动态给出RGB的值(VB6.0源代码编写)Option Explicit

文件大小:1.16MB

文件格式:RAR

更新时间:2012-02-10 11:20:12

取色器,动态给出RGB的值(VB6.0源代码编写)Option Explicit

取色器,动态给出RGB的值(VB6.0源代码编写)Option Explicit Private Declare Function GetPixel Lib "gdi32" (ByVal hDC As Long, ByVal X As Long, ByVal Y As Long) As Long Dim pColor As Long Dim R As Long, G As Long, B As Long Private Sub Form_Load() Picture1.ScaleMode = 3 Picture1.Picture = LoadPicture(App.Path & "\1.bmp") End Sub Private Sub Picture1_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single) pColor = GetPixel(Picture1.hDC, X, Y) R = pColor And &HFF G = (pColor And 65280) / 256 B = (pColor And &HFF0000) / 65536 Text1 = R Text2 = G Text3 = B End Sub


【文件预览】:
VB090120-取色器
----2.cur(958B)
----Form1.frm(3KB)
----取色器()
--------reamde.txt(687B)
--------1.bmp(1.11MB)
--------取色器.exe(20KB)
----工程1.vbp(755B)
----MSSCCPRJ.SCC(190B)
----Form1.frx(970B)
----Thumbs.db(7KB)
----工程1.vbw(52B)
----1.bmp(1.11MB)
----1.cur(1KB)
----3.cur(790B)

网友评论

  • 这个还可以,有些小错误