PC Review


Reply
Thread Tools Rate Thread

Capture Color From Point on Screen

 
 
Jody Gelowitz
Guest
Posts: n/a
 
      6th Aug 2003
I have seen some examples of how to capture a color from a point on screen
using C#, but haven't come across anything with VB.NET. Is this possible
under VB.NET? I know that I will need to use the GetPixel API in order to
do this.

Essentially, I would like to be able to move the mouse around the screen,
and wherever the left button is clicked, I would like to store the color
value of the point where the cursor is located. If possible, I would prefer
to stay in VB.NET

Any ideas?

Thanks,
Jody


 
Reply With Quote
 
 
 
 
Bob Powell [MVP]
Guest
Posts: n/a
 
      6th Aug 2003
Essentially this involves the same teqhnique as capturing the whole screen
or surface of a control.

A thread entitled "Making a ("screenshot") image of a single control" posted
a few days ago has the code for importing the BitBlt API and using it. In
this case you would possibly capture only one pixel unless you had a whole
lot to examine in which case you could capture as much of the screen as you
needed and use GetPixel on the resulting image.

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

Check out the GDI+ FAQ
http://www.bobpowell.net/gdiplus_faq.htm

Buy quality Windows Forms tools
http://www.bobpowell.net/xray_tools.htm

New Tips and Tricks include creating transparent controls
and how to do double buffering.

"Jody Gelowitz" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> I have seen some examples of how to capture a color from a point on screen
> using C#, but haven't come across anything with VB.NET. Is this possible
> under VB.NET? I know that I will need to use the GetPixel API in order to
> do this.
>
> Essentially, I would like to be able to move the mouse around the screen,
> and wherever the left button is clicked, I would like to store the color
> value of the point where the cursor is located. If possible, I would

prefer
> to stay in VB.NET
>
> Any ideas?
>
> Thanks,
> Jody
>
>



 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Excel screen capture to capture cells and row and column headings jayray Microsoft Excel Misc 5 2nd Nov 2007 11:01 PM
how to get the System.Drawing.Point of FormStartPosition, e.g. if i want to recenter the form on the screen at some point other then startup. dr Microsoft C# .NET 1 18th Feb 2007 08:58 AM
how to get the System.Drawing.Point of FormStartPosition, e.g. if i want to recenter the form on the screen at some point other then startup. dr Microsoft VB .NET 1 18th Feb 2007 05:34 AM
Looking for a capture device that can capture EVERYTHING on my computer screen. Jeff Ingram Windows XP Video 2 11th Mar 2005 03:34 AM
Looking for a capture device that can capture computer screen. Jeff Ingram ATI Video Cards 5 7th Mar 2005 05:50 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 09:54 PM.