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 wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Color Dropper Tool

Status
Not open for further replies.

mattscotney

Programmer
Jul 31, 2002
57
AU
How do I create an color dropper tool?

The user clicks a button, the mouse cursor changes to an eye dropper tool,
a panel changes to the color of the pixel at the mouse position as the mouse moves around the screen.

I need the code to get the color of the pixel at the position of the mouse.

This is what I have done so far, I can get the pixel color of a bitmap, but how do I get the color of the screen at any given pixel?

colorPANEL.BackColor = bmp.GetPixel(50, 50)

The solution should work for the whole screen, not just the client area.

Thanks :)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top