Bill Greer

Bill Greer

  • NA
  • 1
  • 1.8k

I need a little help with C# PrintPreivew

Oct 1 2010 9:31 PM

I am new to C#.
I have the following in my form class:

private void btnPrintPackingSlip_Click(object sender, EventArgs e)
{
printPreviewDialog1.Document = printDocument1;
printPreviewDialog1.ShowDialog();


}


private void btnPrintPackingSlip(object sender, System.Drawing.Printing.PrintPageEventAr… e)
{
Font HeadingFont = new Font("Broadway BT", 48);
Font SmallerFont = new Font("Broadway BT", 14);
Bitmap bmp = new Bitmap("bombay.gif");
Brush brBlack = Brushes.Black;
Brush brRed = Brushes.Red;

//Draw image on document
e.Graphics.DrawImage(bmp, 20, 20);


}

My btnPrintPackingSlip causes a blank page in the print preview dialog, so it never reaches my btnPrintPackingSlip method. What do I have wrong?
 

Answers (1)