[求助]自动检测相应坐标(X、Y表示)所对应的RGB值
如何能在form1_load中写入代码,让程序一运行就自动检测相应坐标(X、Y表示)所对应的RGB值。
Dim rgb As Long
Dim r As String, g As String, b As String
rgb = Picture1.Point(8070, 6555)
r = rgb \ &HFF
g = (rgb \ &HFF00) \ &H100
b = (rgb \ &HFF0000) \ &H10000
Text1.Text = "R:" & r & ", G:" & g & ", B:" & b
为什么这段代码返回的RGB为0,0,0?(实际RGB为238,2.32)
问题出在哪,请帮忙看看!
Dim color As Long
Dim r As String, g As String, b As String
color = Picture1.Point(8070, 6555)
r = color Mod &H100
g = (color \ &H100) Mod &H100
b = (color \ &H10000) Mod &H100
Text1.Text = "R:" & r & ", G:" & g & ", B:" & b
这样RGB=-1,0,0,为什么?
能详细点吗?或给段代码,先谢过!