На VBNet.ru нашел такой код:
Private Declare Function CreateDC& Lib "gdi32" Alias "CreateDCA" (ByVal lpDriverName As String, ByVal lpDeviceName As String, ByVal lpOutput As String, lpInitData As Any)
Private Declare Function DeleteDC& Lib "gdi32" (ByVal hdc As Long)
Private Declare Function GetPixel Lib "gdi32" (ByVal hdc As Long, ByVal x As Long, ByVal y As Long) As Long
Private Declare Function GetCursorPos Lib "user32" (lpPoint As POINTAPI) As Long
Private Type POINTAPI
x As Long
y As Long
End Type
Dim z As POINTAPI
Private Sub Form_Load()
Timer1.Interval = 10
End Sub
Private Sub Timer1_Timer()
GetCursorPos z
screendc = CreateDC("DISPLAY", "", "", 0&)
Text1 = Hex(GetPixel(screendc, z.x, z.y))
Picture1.BackColor = GetPixel(screendc, z.x, z.y)
DeleteDC (screendc)
End Sub
А как сделать чтобы выводился html цвет(типа #FFFFFF)?