mattscotney
Programmer
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
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