07-13-2012 09:24 AM
I'm writing a program that needs to print various reports, some of which are generated into text buffers. PrintControl() brings up the printer selection box before printing, PrintTextBuffer() and PrintTextFile() do not. Here is a routine that will bring up the Windows printer selection box, copy some initial parameters into it from the current LabWindows/CVI printer settings, allow the user to select the printer, and then load the results back into the active printer settings to that PrintTextBuffer() and PrintTextFile() will print to the selected printer with the selected paper orientation.
You need to have the full SDK installed to use this. For further information, look in the microsoft online documentation:
http://technet.microsoft.com/en-us/library/ms646940%28v=VS.85%29.aspx
07-16-2012 09:43 PM
Hi pblase,
Maybe you'd be interested in uploading your code to the NI Developer Community? Also, which SDK are you referring to?
Cheers,
07-16-2012 09:52 PM
Ah, pardon me. I meant to hyperlink the NI Developer Community for you. Anyway...by posting there you should be able to get more feedback and also make it easier for others to find your program. ![]()
Cheers,
07-17-2012 08:25 AM
Code was attached, but I can do it again. I'm using LabWindows/CVI 2010.
07-18-2012 11:48 AM
I just want to double check that you don't have any specific questions about your program. Your initial post led me to believe that you were posting code for everyone else's benefit. Let us know if you need help with something specific.
Cheers,
07-18-2012 12:12 PM
No questions, and yes it's for people to use.
Thanks
Paul