zoukankan      html  css  js  c++  java
  • 屏幕截图

    实现效果:

      

    知识运用:

      Graphics类的CopyFromScreen方法  //该方法用于执行颜色数据(对应于由像素组成的矩形)从屏幕到Graphics的绘图画面的为块传输

      public void CopyFromScreen(int sourceX, int sourceY, int destinationX, int destinationY, Size blockRegionSize);

      

    实现代码:

            private Bitmap CaptureNoCursor()
            {
                Bitmap bmap = new Bitmap(Screen.GetWorkingArea(this).Width,Screen.GetWorkingArea(this).Height);
                using(Graphics g=Graphics.FromImage(bmap))
                {
                 g.CopyFromScreen(0,0,0,0,bmap.Size);
                }
                return bmap;
            }
    

      

  • 相关阅读:
    信号
    test
    keil4打开keil5工程卡死问题
    day01
    SSH问题
    QT_day02
    QT_day01
    C++_day9am
    文件描述符与重定向
    C++_day8pm_多态
  • 原文地址:https://www.cnblogs.com/feiyucha/p/10322244.html
Copyright © 2011-2022 走看看