I have for almost 2 weeks struggled with a problem in my application. I want it to click on an image, if the image is then found in a region of my screen, or preferably if the image exists on my whole entire screen. From studies i've learned that it would be better if put it into arrays. I want it to be as efficient and process cheap as possible as this is ment to run in the background for work to close annoying popups.
I have tried pretty much everything out there with no success whatsoever. The one i came the closest suceeding with was another SOF post With a user writing a module which i Could use like so:
Dim p As Point = yourBitmap.Contains(bmpYouLookFor)
If p <> Nothing Then
'...
End If
Do you really have to search for a pixel and then compare your image to the one on the screen, that just seems kinda slow to me. If the pixels exists it will spend alot of time looking at false stuff.
I really hope it doesn't look like a leach I have really tried looking up forum posts, guides, referencing another language into VS, asking coder friends, google and other things for the past 1½-2 weeks
EDIT: Basicly i need to compare 1 small image with the screen. If the screen contains my image, I want to get the position of the small image and the click on it.
If you know the locations of all images on the screen, you can retrieve the location the user clicks and then see if the point intersects with any of the rectangles (images) you know about.
myImageRectangle.Contains(myMouseClickedPoint)