LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

prompt to select printer

I'm using the function PrintTextFile to print a file. Instead of just going to the default printer, I would like to have a dialog pop up to select from the printers installed on the machine. How can I do this?
0 Kudos
Message 1 of 8
(4,068 Views)
As far as I can see in the documentation, both PrintTextFile and PrintTextBuffer are directed to the default printer in the system. I never tried using this attribute, but you may test to see wether calling SetPrintAttribute (ATTR_PRINTER_NAME, "Printer Name"); before printing permits you to redirect output to a specific printer or not.


Proud to use LW/CVI from 3.1 on.

My contributions to the Developer Community
________________________________________
If I have helped you, why not giving me a kudos?
0 Kudos
Message 2 of 8
(4,049 Views)

The library call to PrintCtrl (print out a control on a panel) calls the Windows printer dialog; the call to PrintTextBuffer does not. How can I call up the printer dialog if printing a text buffer?

0 Kudos
Message 3 of 8
(3,710 Views)

I didn't try it, but couldn't you display your text on a hidden or transparent control and then use PrintCtrl?

0 Kudos
Message 4 of 8
(3,707 Views)

This is an old post so I don't remember the history of it. I probably found the solution a while ago.

0 Kudos
Message 5 of 8
(3,704 Views)

I haven't found it anywhere yet.

0 Kudos
Message 6 of 8
(3,700 Views)

You can probably create a hidden control with the text buffer pasted to it and print that out.

0 Kudos
Message 7 of 8
(3,693 Views)

see three posts earlier 😉

0 Kudos
Message 8 of 8
(3,686 Views)