16,555
社区成员
发帖
与我相关
我的任务
分享
Declare Function GetDC Lib "user32" Alias "GetDC" (ByVal hwnd As Integer) As Integer
Declare Function GetPixel Lib "gdi32" Alias "GetPixel" (ByVal hdc As Integer, ByVal x As Integer, ByVal y As Integer) As Integer
Private Function GetRGB() As Integer
Dim ScreenDC = GetDC(0)
Dim TheRGB = GetPixel(ScreenDC, MousePosition.X, MousePosition.Y)
Return TheRGB
End Function