Beispiel #1
0
        public static ReplyData executeQuery(QueryData receivedQueryData)
        {
            ReplyData returnedReplyData = new ReplyData();
            returnedReplyData.Type = Consts.SectionType.CaptureScreen;
            // byte[] b = ScreenCapturing.GetDesktopWindowCaptureAsByteArray();
            var img = CaptureScreen.CaptureScreen.GetDesktopImage();
            byte[] b = ScreenCapturing.GetBytes(img);


            returnedReplyData.ArrDataContainers.Add(b);
            return returnedReplyData;
        }
Beispiel #2
0
 /// <summary>
 /// Gets a byte array of a bitmap for the window specified by the handle
 /// </summary>
 /// <param name="hWnd"></param>
 /// <returns></returns>
 public static byte[] GetWindowCaptureAsByteArray(int handle)
 {
     return(ScreenCapturing.GetBytes(ScreenCapturing.GetWindowCaptureAsBitmap(handle)));
 }
Beispiel #3
0
 /// <summary>
 /// Gets a byte array of a bitmap for the desktop window
 /// </summary>
 /// <returns></returns>
 public static byte[] GetDesktopWindowCaptureAsByteArray()
 {
     return(ScreenCapturing.GetBytes(ScreenCapturing.GetDesktopWindowCaptureAsBitmap()));
 }