473,398 Members | 2,404 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,398 software developers and data experts.

Capture Color From Point on Screen

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
Nov 19 '05 #1
1 6479
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" <jg*******@visualstatement.com.nospam> wrote in message
news:eD**************@tk2msftngp13.phx.gbl...
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

Nov 19 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Me Mine | last post by:
i, I have trying to code a small console app that will allow a user to select a window and then create a screen capture of the window. I haven't been able to figure out how to do the screen...
1
by: xc | last post by:
Greetings. I encountered a wield problem when grabing screen images. Sometimes in some computers I can capture the screen, but other times not so. In some computer I cannot capture the screen...
3
by: Per | last post by:
Hi all, This may be a newbie question, but I can't find the answer anywhere. I want to make a capture of the screen, or a part of the screen, that contains the main portion of the form. Detecting...
2
by: Eddie Dunn | last post by:
I have one here that I cannot find anything on in my searching. I am implementing a screen capture functionality into my Visual Basic ..NET application. The code I am using calls the bitblt...
4
by: gwhite1 | last post by:
I use this code to capture a screen in a regular VB 2005 windows app. It works great! I found the code in google. But when I create a windows service it does not capture the screen. It only...
2
by: dumbledad | last post by:
Hi All, I'm using ASP.Net web services to provide the logic required for a Flash based prototype. The Flash and the ASP .Net run together on the client machine. One of the functions I'd like to...
5
Atran
by: Atran | last post by:
Hello Everyone. In this article: You will know to capture the screen in 2 ways: 1)- Capture full screen. 2)- Capture region. Let's Begin: First make a new Windows Application project. And...
0
by: JB | last post by:
On 8 Apr, 10:03, "DSK Chakravarthy" <dskch...@msn.comwrote: Thanks for the reply. So the first part is looking easy enough. As for the next part: Well I have a winform which has a few text...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.