I have made a function in my program that will print off bitmaps and a image from a picturebox, but now want to print a label with text in it as well. This is my current code:
private void printToolStripMenuItem_Click(object sender, EventArgs e)
{
if (printDialog1.ShowDialog() == System.Windows.Forms.DialogResult.OK)
{
printDocument1.Print();
}
}
private void printDocument1_PrintPage(object sender, System.Drawing.Printing.PrintPageEventArgs e)
{
e.Graphics.DrawImage(capturebox.BackgroundImage, 0, 0);
e.ToString(ExtraNotes.Text);
e.Graphics.DrawImage(capturebox.Image, 0, 0);
}
My label is called ExtraNotes, and my picturebox is capturebox.
I want to be able to print both of these with the label contents either to the side or below the image, i don't mind.
I also want to be able to print preview this using a print preview dialog of which i don't know how to make show this, i can get it to open but not show the things i want it to.