by Support Team » Wed Sep 24, 2008 1:17 pm
First of all you need to save the icon as a bitmap (see System.Drawing.Icon.ToBitmap method). Then you can use the CompareImage and FindImage methods of the form with the bitmap. You can calculate the offset for the CompareImage method by using the FindImage once.
The only thing with icons is that you need to consider transparent areas. When saving icons as a bitmap, these transparent colors will be replaced with a default color, so the transparency gets lost. So, if your form icon hast transparent areas, be sure to crop those areas with an image editor first.
Regards,
Alex
Ranorex Support Team