Color on Click

  • Thread starter Thread starter Bill English
  • Start date Start date
B

Bill English

Is it possible to get the color of the screen at the cursor's current
position?
 
You can capture the screen using interop and the BitBlt. This is explained
in the GDI+ FAQ.

You could extrapolate from that code to capture a 1 pixel bitmap from the
mouse's screen position and then interrogate the colour using the GetPixel
method.

--
Bob Powell [MVP]
Visual C#, System.Drawing

The Image Transition Library wraps up and LED style instrumentation is
available in the June of Well Formed for C# or VB programmers
http://www.bobpowell.net/currentissue.htm

Answer those GDI+ questions with the GDI+ FAQ
http://www.bobpowell.net/gdiplus_faq.htm

The GDI+ FAQ RSS feed: http://www.bobpowell.net/faqfeed.xml
Windows Forms Tips and Tricks RSS: http://www.bobpowell.net/tipstricks.xml
Bob's Blog: http://bobpowelldotnet.blogspot.com/atom.xml
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top