熱點推薦:
您现在的位置: 電腦知識網 >> 編程 >> .NET編程 >> 正文

用C#實現全屏幕抓圖

2022-06-13   來源: .NET編程 

  int width = ScreenPrimaryScreenBoundsWidth;

  int height = ScreenPrimaryScreenBoundsHeight;

  Bitmap bmp = new Bitmap(width height);

  using (Graphics g = GraphicsFromImage(bmp))

  {

  gCopyFromScreen( new Size(width height));

  }

  bmpSave(@c:\jpg);

  bmpDispose();

  參考


From:http://tw.wingwit.com/Article/program/net/201311/13282.html
    Copyright © 2005-2022 電腦知識網 Computer Knowledge   All rights reserved.