Esempio n. 1
0
        public void grabwholescreen(int sc)  // called when ALL screen capture; sc is screen number
        {
            for (int j = 0; j < noofscreens; j++)
            {
                grabwindow[j].Close(); grabwindow[j].Dispose();
            }
            capture_class.CaptureScreentoClipboard(screens[sc].Bounds.X, screens[sc].Bounds.Y, screens[sc].Bounds.Width, screens[sc].Bounds.Height);
            Preview p = new Preview(this);

            p.Show();
        }
Esempio n. 2
0
        public void smallscreengrab(int sc, int x, int y, int x1, int y1) // grab part of screen
        {
            for (int j = 0; j < noofscreens; j++)
            {
                grabwindow[j].Close(); grabwindow[j].Dispose();
            }
            int finalx, finaly, finalwidth, finalheight;
            int X1 = Math.Min(x, x1), X2 = Math.Max(x, x1), Y1 = Math.Min(y, y1), Y2 = Math.Max(y, y1);

            finalx      = X1 + screens[sc].Bounds.X;
            finaly      = Y1 + screens[sc].Bounds.Y;
            finalwidth  = X2 - X1 + 1;
            finalheight = Y2 - Y1 + 1;
            capture_class.CaptureScreentoClipboard(finalx, finaly, finalwidth, finalheight);
            Preview p = new Preview(this);

            p.Show();
        }