/// <summary> /// Captures Active Window and draws cursor if the option is set in WorkflowConfig /// </summary> /// <param name="WorkflowConfig">Optios for Active Window</param> /// <returns></returns> public static Image CaptureWithGDI2(Workflow WorkflowConfig) { DebugHelper.WriteLine("Capturing with GDI"); Image tempImage = null; Screenshot.DrawCursor = WorkflowConfig.DrawCursor; if (WorkflowConfig.ActiveWindowClearBackground) { tempImage = Screenshot.CaptureActiveWindowTransparent(); } else { tempImage = Screenshot.CaptureActiveWindow(); } return(tempImage); }