Board index » cppbuilder » Error: Printer index out of range
Error: Printer index out of range
2005-06-10 08:02:30 PM
I received an error "printer index out of range" while printing with
My code is:
If I print without doing PrinterSetup(), no problem.
What could be the problem?
Thanks in advance,
P.S.:I'm using Borland C++ builder 6 over Windows 2000.
2005-06-10 11:02:35 PM
Re:Error: Printer index out of range
Do you actually have printers on installed on the system? Is the
default printer online when you do this? In the back of my mind,
there's a bug in the printersetupdialog that causes a problem (many
versions ago). What I ended up doing was this:
bool PrinterExists = (Printer()->Printers->Count); // Check for existence of a printer
Anil Sahin wrote: