Example #1
0
 public void CleanScreen()
 {
     using (SystemGraphics g = SystemGraphics.FromHdc(GetDC(IntPtr.Zero)))
     {
         SHChangeNotify(0x8000000, 0x1000, IntPtr.Zero, IntPtr.Zero);
         g.DrawLine(new System.Drawing.Pen(System.Drawing.Brushes.Transparent, canvasHeight), 0, 0, canvasWidth, 0);
         g.Dispose();
     }
 }
Example #2
0
        public void Draw(String message)
        {
            using (SystemGraphics g = SystemGraphics.FromHdc(GetDC(IntPtr.Zero)))
            {
                offScreenDC.FillRectangle(backBrush, 0, 0, canvasWidth, canvasHeight);
                offScreenDC.DrawString(message, timerFont, timerBrush, 0, 0);

                g.DrawImage(offScreenBmp, 0, 0);
                g.Dispose();
            }
        }
Example #3
0
 public BufferedGraphics Allocate(IntPtr targetDC, Rectangle targetRectangle)
 {
     return(Allocate(Graphics.FromHdc(targetDC), targetRectangle));
 }