How Do I get the Color Value(argb) from a background image in a window under my mouse?

Please help.

I have looked every where. I dont want to use the color picker control.

I want to hover the mose over my currently open window which has a background image and display the color value of any pixel it is currently over in a textbox.

please post response here and to my email address incase I cant find this forum again.

pliszkacm@hotmail.com

Thanks



Answer this question

How Do I get the Color Value(argb) from a background image in a window under my mouse?

  • Christopher Bermingham

    Thanks for the reply, but I am still a c# newbie.

    Please give me a code snipet.

    I am in direct x 9c and have a form in widows mode with graphics on it and sprites.

    I want to be able to detect a color when I have a mouse over a certin point.

    The getpixel seems like it would work, but how do i store the color in a variable


  • Peter Senescu

    Are you displaying the background image yourself If so, GetPixel will give you want you want, you just need to work out your mousepos as it relates to the image.



  • How Do I get the Color Value(argb) from a background image in a window under my mouse?