|
可以考虑一下这种做法:
获取指定位置的color值
Dim hDC, hWndDim iX, iY
'Declare win32 and gdi32 functions
Extern.Declare MicLong, "GetPixel", "gdi32″, "",MicLong, MicLong, MicLong
Extern.Declare MicLong, "GetDC", "user32″,"", MicLong
Extern.Declare micLong,"ReleaseDC","user32″,"",micLong,micLong
'Attach to the desktop graphical context
hWnd = cLng(0)
hDC = Extern.GetDC(hWnd)
iX = 10 'Change this to your relevant X coordinate
iY = 10 'Change this to your relevant Y coordinate
'Get the pixel color code
Print Extern.GetPixel (hDC, iX,iY)
'Release the graphical context
Extern.ReleaseDC hWnd, hDC |
|