Ejemplo n.º 1
0
 private void StartSnipping()
 {
     if (!_isSnipping)
     {
         _isSnipping = true;
         SnippingTool.Snip();
     }
 }
Ejemplo n.º 2
0
        public static void Snip()
        {
            var screens = ScreenHelper.GetMonitorsInfo();

            _forms = new SnippingTool[screens.Count];
            for (int i = 0; i < screens.Count; i++)
            {
                int hRes = screens[i].HorizontalResolution;
                int vRes = screens[i].VerticalResolution;
                int top  = screens[i].MonitorArea.Top;
                int left = screens[i].MonitorArea.Left;
                var bmp  = new Bitmap(hRes, vRes, PixelFormat.Format32bppPArgb);
                using (var g = Graphics.FromImage(bmp))
                {
                    g.CopyFromScreen(left, top, 0, 0, bmp.Size);
                }
                _forms[i] = new SnippingTool(bmp, left, top, hRes, vRes);
                _forms[i].Show();
            }
        }