用C#实现全屏幕抓图

商帝国咨询头像

阅读 14118 | 分类:文章

int width = Screen.PrimaryScreen.Bounds.Width;

  int height = Screen.PrimaryScreen.Bounds.Height;

  Bitmap bmp = new Bitmap(width, height);

  using (Graphics g = Graphics.FromImage(bmp))

  {

  g.CopyFromScreen(0, 0, 0, 0, new Size(width, height));

  }

  bmp.Save(@"c:\1.jpg");

  bmp.Dispose();

留言区(共0条)

暂无留言,快来抢占沙发~
作者声明:非原创
平台声明:文章及评论仅代表作者本人观点,五略商书系信息发布平台,仅提供信息存储空间服务,如有侵权,请联系13521509118。转载请注明作者和出处:转自五略商书m.shangdiguo.com,作者商帝国咨询!