프로그래밍언어/VB.NET

GETpixel 로 색깔가져오기

부산딸랑이 2013. 11. 2. 18:16

Dim LocalMousePosition As Point
PublicDeclareFunction GetPixel Lib "gdi32.dll" (ByVal hdc AsInteger, ByVal x AsInteger, ByVal y AsInteger) As
Integer
PublicDeclareFunction GetWindowDC Lib "user32.dll" (ByVal hwnd AsInteger) As
Integer
PublicDeclareFunction GetDesktopWindow Lib "user32.dll" () As
Integer
Dim winDc = GetWindowDC(GetDesktopWindow)
Dim color = GetPixel(winDc, LocalMousePosition.X, LocalMousePosition.Y).ToString