Thanks for your inputs.
I tried both the methods. These two methods are depends on screen resolution and monitor sizes. These methods are not working when I am running tests on different test machines having different screen resolutions.
Is there anyway to compare to bitmaps which is independent of screen resolution.