Johan Stäck
2007-09-06 06:33:29 UTC
Hello!
I have this VB6 application that prints on the designated default printer.
The program doesn't in itself have any functionality for selecting a
printer or doing printer setup.
If no printer is found, the program will inform the user about this, and
all printing functions are disabled.
Some time ago I was installing the program at a customer site and there
was both a local printer and a network printer, and there was a lot of
"fiddling" with printer drivers, network issues etc. It was all a mess.
I encountered a nasty bug (in the printer handling)in my own program.
The reason was that in some way I had managed to create the situation
where the PC running my program "saw" only one printer, but this printer
was *not* designated as default printer. I.e. there was no default printer.
Now, I have tried to re-create this situation (one printer, *not*
designated as default), but I am not able to do it.
Windows seems always (quite logically) to designate a single remaining
printer as being default.
Og course I am afraid that a customer will eventually again be creating
the situation that caused the nasty bug, and I want to catch it..
Anyone with ideas on how to recreate the "one-printer-not-being-default"
situation?
Tia
/Johan Stäck
Skelleftå
Sweden
I have this VB6 application that prints on the designated default printer.
The program doesn't in itself have any functionality for selecting a
printer or doing printer setup.
If no printer is found, the program will inform the user about this, and
all printing functions are disabled.
Some time ago I was installing the program at a customer site and there
was both a local printer and a network printer, and there was a lot of
"fiddling" with printer drivers, network issues etc. It was all a mess.
I encountered a nasty bug (in the printer handling)in my own program.
The reason was that in some way I had managed to create the situation
where the PC running my program "saw" only one printer, but this printer
was *not* designated as default printer. I.e. there was no default printer.
Now, I have tried to re-create this situation (one printer, *not*
designated as default), but I am not able to do it.
Windows seems always (quite logically) to designate a single remaining
printer as being default.
Og course I am afraid that a customer will eventually again be creating
the situation that caused the nasty bug, and I want to catch it..
Anyone with ideas on how to recreate the "one-printer-not-being-default"
situation?
Tia
/Johan Stäck
Skelleftå
Sweden