|
-
Mar 1st, 2002, 02:17 PM
#1
Thread Starter
Frenzied Member
determine pixel color , not GetPixel !!
Hi.
I have a form with several objects moving around by timer.
when the objects have finished moving I want to know the color of the pixel at the 0,0 point of a certain picture box.
BUT, the reason I can't use GetPixel is:
I don't want it to necessarily return the color value in Picture1.
I only want that value to be returned if nothing is in front of Picture1. If another object is in front of picture1 at point 0,0 , want that color to be returned. So, in graphic terms, that means whatever color the user sees at that point on the screen, is the color info I want to collect.
Any thoughts?
Thanks
Wengang
Wen Gang, Programmer
VB6, QB, HTML, ASP, VBScript, Visual C++, Java
-
Mar 1st, 2002, 02:49 PM
#2
Addicted Member
You'd have to check for overlapping controls manually.
"1 4m 4 1337 #4xz0r!'
Janus
-
Mar 1st, 2002, 07:19 PM
#3
Thread Starter
Frenzied Member
well, that's what I'm trying to avoid for speed's sake
There is no way to just get a pixel color at a certain screen point regardless of what control occupies it?
The color picker in several programs can draw from any area of the screen, even other windows, though
Wen Gang, Programmer
VB6, QB, HTML, ASP, VBScript, Visual C++, Java
-
Mar 4th, 2002, 08:13 AM
#4
You can bitblit a small part of the picturebox to a new picturebox.
then use getpixel on the new picturebox. Bitblit works fast I think and will only capture the frontmost stuff.
zai hui,
Helger
-
Mar 4th, 2002, 08:43 AM
#5
transcendental analytic
getdc your window and getpixel with coordinates client to it
Use  
writing software in C++ is like driving rivets into steel beam with a toothpick.
writing haskell makes your life easier:
reverse (p (6*9)) where p x|x==0=""|True=chr (48+z): p y where (y,z)=divMod x 13
To throw away OOP for low level languages is myopia, to keep OOP is hyperopia. To throw away OOP for a high level language is insight.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|