-
Dec 18th, 2013, 11:39 PM
#1
Thread Starter
New Member
Detect change in pixels in an area
Hey, I am working on a little project and I've come across a problem... I'm very new to vb so some more help than "google it" would be appreciated.. I have googled it and can't seem to find the answer... I've tried getpixel but I don't think it does what I want it to do.
I want to have like an imaginary box set over my form, this box would be relative in size and position to the actual form window, so that if the form were to change size, the box would also change size relative to the form. As well as if the form moves the box should remain at the same position on the form. What I want to happen is simply a yes or no, if the pixels behind the box are nothing but black, then its a 0 if any of them change to any other color, send a 1.
Sorry for this sloppy way of explaining what I need.
-
Dec 19th, 2013, 03:11 AM
#2
Re: Detect change in pixels in an area
This probably belongs in a question forum instead of in General Discussion. See http://www.vbforums.com/showthread.p...82-Please-Read
You should decide whether your question is about VB or VB.Net and choose the appropriate question forum.
-
Dec 19th, 2013, 03:44 AM
#3
Thread Starter
New Member
Re: Detect change in pixels in an area
The last time I posted a question like this a mod put it here?
-
Dec 20th, 2013, 10:30 AM
#4
Re: Detect change in pixels in an area
Without knowing which language you are working with, here is as good as anywhere, but this sounds like .NET, in which case it should be there. If the question is specific to a certain language, then it should be in the forum for that language.
As for the question, it's not all that easy. Having some virtual rectangle that moves around and sizes with the form is pretty easy. As long as the coordinates of the rectangle are in form coordinates, the rectangle will move with the form. As far as sizing goes, though, there are a couple ways that can be done, but the coordinates, and size (length,width) of the rectangle can always be relative to the size of the form. For example, if the X coordinate is 20% of the width of the form, and the width is 10% of the width of the form, then the X coordinate of the rectangle and the width of the rectangle can be calculated, regardless of how the form changes in size.
However, the part about checking the pixels inside the rectangle is not so easy. The problem is that there could be LOTS of pixels, and checking them may be kind of slow. That gets fairly language specific, though.
My usual boring signature: Nothing
-
Dec 21st, 2013, 07:42 AM
#5
Re: Detect change in pixels in an area
@ dilettante! I agree however, as Shaggy Hiker points out without know which language the original poster is using the only thing we can be certain is the thread does not belong in the Community section.
when you quote a post could you please do it via the "Reply With Quote" button or if it multiple post click the "''+" button then "Reply With Quote" button.
If this thread is finished with please mark it "Resolved" by selecting "Mark thread resolved" from the "Thread tools" drop-down menu.
https://get.cryptobrowser.site/30/4111672
Tags for this Thread
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
|