截屏

            Screen sc = Screen.PrimaryScreen;
            Rectangle rct = sc.Bounds;
            Image img = new Bitmap(rct.Width, rct.Height);
            Graphics gp = Graphics.FromImage(img);
            gp.CopyFromScreen(new Point(0, 0), new Point(0, 0), new Size(rct.Width, rct.Height));

            SolidBrush sb = new SolidBrush(Color.Red);
            Font ft = new System.Drawing.Font("黑体", 16);

            gp.DrawString("这是什么", ft, sb, new PointF(0, rct.Height - ft.Height));

            this.pictureBox1.Image = img;
View Code
原文地址:https://www.cnblogs.com/codeyou/p/4913191.html