Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Wanet Telecoms Ltd on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Is there some new .NET-approved way

Status
Not open for further replies.

Jerrycurl

Programmer
Aug 4, 1999
85
US
Is there some new .NET-approved way to get the color of a pixel in a window (a window external to my program). In VB6 I would do something like this using API functions:

GetCursorPos p
hwnd = WindowFromPoint(p.x, p.y)
deskhdc = GetDC(hwnd)
rgbVal = GetPixel(deskhdc, p.x, p.y)
retval = ReleaseDC(hwnd, deskhdc)


Is there a better way to do this in .NET or is this still the way to go?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top