The problem is that the following (much condensed) code does what it's supposed to in Win98SE but not in XP.
The intent is to change the default printer to one specified in a setup table; change to a specific font that is an internal font for the printer (specifically font '15 cpi'); and print the contents of a file. The printer is a 40-column receipt printer.
As I step through the code on both operating systems (98 & XP) everything appears to work, That is, the printer is set as the default printer; the font is changed to '15 cpi' and printing proceeds. The difference is that, in Win98 appearance and fact coincide. The document is in fact printed with that font and all is well. In XP the document is also printed but using some other font which appears to be a downloaded font that is much slower. The font in XP is also a proportional font whereas '15 cpi' is non-proportional.
This happens regardless of the details of the connection port (serial or parallel).
If I open the file I'm printing in wordpad and change its font to 15 cpi then it prints successfully using the correct font on both systems.
Does XP have some particular magic associated with talking to printers that's different than earlier OS versions?
The intent is to change the default printer to one specified in a setup table; change to a specific font that is an internal font for the printer (specifically font '15 cpi'); and print the contents of a file. The printer is a 40-column receipt printer.
As I step through the code on both operating systems (98 & XP) everything appears to work, That is, the printer is set as the default printer; the font is changed to '15 cpi' and printing proceeds. The difference is that, in Win98 appearance and fact coincide. The document is in fact printed with that font and all is well. In XP the document is also printed but using some other font which appears to be a downloaded font that is much slower. The font in XP is also a proportional font whereas '15 cpi' is non-proportional.
This happens regardless of the details of the connection port (serial or parallel).
If I open the file I'm printing in wordpad and change its font to 15 cpi then it prints successfully using the correct font on both systems.
Does XP have some particular magic associated with talking to printers that's different than earlier OS versions?
Code:
[COLOR=green]' Save the current default printer and pick the
' specified printer for this print job.[/color]
Old_Default = SetPrinterAsDefault(PrinterName)
SelectAPrinter PrinterName, SelectedPrinter
Set Printer = SelectedPrinter
Printer.Font.Name = "15 cpi"
For n = 1 To nCopies
[COLOR=green]' Open the file to be printed.[/color]
nH_Input = FreeFile
Open FileName For Input As #nH_Input
[COLOR=green]' Set up Print Parameters.[/color]
Do Until EOF(nH_Input)
Line Input #nH_Input, cBuf
Printer.Print cBuf
Loop
Close
Printer.Print " "
Printer.EndDoc
[COLOR=green]' Code for cutting the paper omitted.[/color]
Next