LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Print dialog changes have no effect to the printout

I insert the "Set Default Printer.vi" in a sequence before the "Print Report.vi" (used to print a standard report). I run the vi and when appears the print dialog box I set the printer properties as I want and I select "OK", but the printout doesn't "feel" the new printer setup and was printed with the default printer setup (e.g. do not change from monochromatic (default) to color mode).

Where is the error?

I attach an example vi. (I'm using LV6.1 over a Win98 machine)
Download All
0 Kudos
Message 1 of 4
(2,922 Views)
Window print dialogs does not change system parameters. It only provide an way for programmer to collect data from users. How to use these parameters is upto the programmer. That's window design, nothing to do with LabVIEW.

However, Set Default Printer itself is not a window printer dialog. You should be able to switch to another printer.


George Zou
http://gtoolbox.yeah.net
George Zou
Message 2 of 4
(2,922 Views)
OK, I understand.
But, how I can collect data from print dialog window? And there is a way to set printer properties with this collected data?

Thanks!
0 Kudos
Message 3 of 4
(2,922 Views)
You can call print dialogs yourself to collect data, such as number of pages, number of copies, etc. But these data are useless, unless you want to do the print job youself. It's programmer's job to take care all the troubles so that users can set printer properties. Programmer can't. 😉

There are examples in C on MSDN demonstrate how to call print dialogs to collect data, get printer dc, set abort procedure, start document, start page, draw image/text on it, end page, end document, etc.

The following link point to "Print Dialog Box" on MSDN:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/winui/WinUI/WindowsUserInterface/UserInput/CommonDialogBoxLibrary/AboutCommonDialogBoxes/PrintDialogBox.asp

Good luck.

George Zou
h
ttp://gtoolbox.yeah.net
George Zou
0 Kudos
Message 4 of 4
(2,922 Views)