截取桌面图片

Screen s = Screen.PrimaryScreen;
            Bitmap bit = new Bitmap(s.Bounds.Width, s.Bounds.Height);

            Graphics g = Graphics.FromImage(bit);
            g.CopyFromScreen(new Point(0, 0), new Point(0, 0), bit.Size);
            bit.Save("d:\\j.bmp");

  

你可能感兴趣的:(截取桌面图片)