protected override void OnPaint(PaintEventArgs e) { using (var LCK = Gdi.LockGraphics(e.Graphics)) { Gdi.StartOffScreenBitmap(Width, Height); // White Background Gdi.SetBrush(Color.White); Gdi.SetSolidPen(Color.White); Gdi.FillRectangle(0, 0, Width, Height); Gdi.DrawString("Hello World", new Point(10, 10)); Gdi.CopyToScreen(); Gdi.EndOffScreenBitmap(); } }