Windows Printer Settings
There are some Windows "command line" statements that allow one to 1) identify the current Windows default printer (as well as other printers associated with a PC) and 2) then change the default to a different printer. And one can then issue "SHELL" statements in QB64 to execute those command statements. See the following examples by member DonW:
This code issues the command to display a PC's list of printers and routes the output to a text file...
The contents of the resulting file (from one of my PC's) is as follows...the default printer is listed as "TRUE":
Default Name FALSE Microsoft XPS Document Writer TRUE HP Photosmart C7200 series FALSE HP Officejet Pro 8600 FALSE Fax
Here is the code to set the default printer to the "HP Officejet Pro 8600"...
Then running the get Default SHELL code again, we see the following contents of the text file:
Default Name FALSE Microsoft XPS Document Writer FALSE HP Photosmart C7200 series TRUE HP Officejet Pro 8600 FALSE Fax
Now we see that the "HP Officejet Pro 8600" is marked "TRUE", and thus is now the default printer for LPRINT.
These SHELL commands work in Windows XP, 7, 8.1 and 10.