/// <summary> /// Takes a screen shot of the full client area of the BlueStack window /// </summary> /// <returns></returns> static private bool TakeCustomCapture(int left, int top, int right, int bottom) { FastFindWrapper.SetHWnd(GetHWnd(), true); // Bind FastFind with BlueStack window, considers only ClientArea if (FastFindWrapper.SnapShot(left, top, right, bottom, CUSTOM_SNAP) == 0) { Debug.Assert(false, string.Format("FF Capture failed with capture area: ({0},{1})-({2},{3})", left, top, right, bottom)); return(false); } return(true); }
/// <summary> /// Takes a screen shot of the full client area of the BlueStack window /// </summary> /// <returns></returns> static public bool TakeFullScreenCapture(bool forceNew = false) { if (lastFullCapture == null || forceNew) { FastFindWrapper.SetHWnd(GetHWnd(), true); // Bind FastFind with BlueStack window, considers only ClientArea if (FastFindWrapper.SnapShot(0, 0, 0, 0, DEFAULT_SNAP) == 0) { lastFullCapture = null; Debug.Assert(false, "FF Capture failed (full screen)"); return(false); } lastFullCapture = Stopwatch.StartNew(); } return(true); }