Aaron

Aaron

  • NA
  • 2
  • 0

Please fix this print code - error

Apr 21 2006 7:28 PM

for(int intIndex = 0; intIndex < selectedHardwareListBox.Items.Count; intIndex++)

{

strPrintLine = selectedHardwareListBox.Items[intIndex].ToString();

e.Graphics.DrawString(strPrintLine, printFont, Brushes.Black, fltPrintX, fltPrintY);

fltPrintY += fltLineHeight;

strPrintLine = ((double)priceList[intIndex]).ToString("C");

e.Graphics.DrawString(strPrintLine, printFont, Brushes.Black, fltPrintX, fltPrintY);

fltPrintY += fltLineHeight;

}

I seem to get an error when trying to print the second line.  When i take out trying to print the price in the priceList array I dont get any error, whats the deal I dont understand what the problem is. I just keep getting an error saying there is an error in print previewing the document.