如花,如题

解决方案 »

  1.   

    应该是 R-0;G-128;B-128吧.
    不过兄弟,要这个干嘛啊?!
      

  2.   

    Option Explicit
    Private Declare Function GetCursorPos Lib "user32" (lpPoint As POINTAPI) 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 GetDC Lib "user32" (ByVal hwnd As Long) As LongPrivate Type POINTAPI
        x As Long
        y As Long
    End TypePrivate Sub Timer1_Timer()
        Dim Cur As POINTAPI
        Dim Ret As Long
        GetCursorPos Cur
        Ret = GetPixel(GetDC(0), Cur.x, Cur.y)
        Text1.Text = Ret Mod 256 'R
        Text2.Text = (Ret \ 256) Mod 256 'G
        Text3.Text = Ret \ 65536 'B
        Picture1.BackColor = Ret
    End Sub
    ------------------
    一个TIMER、一个PICTURE、三个TEXT。
      

  3.   

    dongge2000(秋日私语:非[版务].灌!) 
    大哥,你的敬业精神确实可嘉,但你这好像不是我想要的结果吧?
    RGB(0,128,128)就可以啦。