I currently found a piece of code on a website but i can't get it to work it always reports fail. Pls help.
Private Function FindImage(Image1 As Bitmap, Image2 As Bitmap) As Point
For y = 0 To Image1.Height - Image2.Height - 1
For x = 0 To Image1.Width - Image2.Width - 1
ix = 0
iy = 0
cnt = 0
While iy < Image2.Height And ix < Image2.Width And Image1.GetPixel(x + ix, y + iy) = Image2.GetPixel(ix, iy)
cnt += 1
ix += 1
If ix = Image2.Width Then
ix = 0
iy += 1
End If
End While
If cnt = Image2.Width * Image2.Height Then
MessageBox.Show("succes")
Return New Point(ix, iy)
Exit Function
End If
Next
Next
MessageBox.Show("fail")
Return New Point(-1, -1)
End Function