Esempio n. 1
0
        public static Rectangle Snip()
        {
            Bitmap ss = SnippingTool.capScreen();

            SnippingTool snipper = new SnippingTool(ss, SnipType.RectSelect);
            if (snipper.ShowDialog() == DialogResult.OK)
            {
                return snipper.rcSelect;
            }

            return new Rectangle(0, 0, 0, 0);
        }
Esempio n. 2
0
        // Record X, Y position
        public static Point Point()
        {
            Bitmap ss = SnippingTool.capScreen();

            SnippingTool snipper = new SnippingTool(ss, SnipType.Point);
            if (snipper.ShowDialog() == DialogResult.OK)
            {
                Rectangle res = snipper.rcSelect;
                return new Point(res.X, res.Y);
            }

            return new Point(0, 0);
        }