The problem is that you are, kinda, doing it as strings... at least, if what you've posted is the entirety of your code. As it is, if I copy paste what you did into my environment, I get that Compare is not a method on picA.
Now... I have to assume that what you're actually doing is something like
var picA = Utils.Picture;
var picB = Utils.Picture;
picA.LoadFromFile("C:\\MyPath\\mypicA.png");
picB.LoadFromFile("C:\\MyPath\\mypicB.png");
in which case, it SHOULD work as you have written it... although, your fourth parameter MAY be the issue... You are using two external files so it MIGHT be that, because they don't have their origin in an actual application and, therefore, might not have the mouse pointer on screen, it could be blowing up there.
So... could you post the actual code you are using? That would be a lot easier to debug then guessing.