프로그래밍언어/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) AsInteger
PublicDeclareFunction GetWindowDC Lib "user32.dll" (ByVal hwnd AsInteger) AsInteger
PublicDeclareFunction GetDesktopWindow Lib "user32.dll" () AsInteger
Dim winDc = GetWindowDC(GetDesktopWindow)
Dim color = GetPixel(winDc, LocalMousePosition.X, LocalMousePosition.Y).ToString