void PrintImage(object o, PrintPageEventArgs e) { int x = SystemInformation.WorkingArea.X; int y = SystemInformation.WorkingArea.Y; int width = this.Width; int height = this.Height; Rectangle bounds = new Rectangle(x, y, width, height); Bitmap img = new Bitmap(width, height); this.DrawToBitmap(img, bounds); Point p = new Point(100, 100); e.Graphics.DrawImage(img, p); } private void button2_Click(object sender, EventArgs e) { pd.PrintPage += new PrintPageEventHandler(PrintImage); pd.Print(); }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)