Code: Select all
public static void ScreenshotAndSave(Adapter AreaToShoot, string NameToSave)
{
Bitmap shotImage = Ranorex.Imaging.CaptureImage(AreaToShoot);
shotImage.Save(NameToSave, System.Drawing.Imaging.ImageFormat.Png);
}
I.e. screenshotting this Forum i would give the element of the 'Ranorex' logo on top, and the element of the search icon on the right, and expect as a screenshot the area defined by those two elements as seen here: Is there a nice way to do this?