NI Home
Cart Cart | Help
Hello Events Academic NI Developer Zone Support Solutions Products & Services Contact NI MyNI
You are here: 
NI Home > NI Developer Zone > NI Discussion Forums


Reply
Active Participant
pblase
Posts: 215
0 Kudos

printer dialog

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

 

Member
KyleP
Posts: 129
0 Kudos

Re: printer dialog

Hi pblase,

 

Maybe you'd be interested in uploading your code to the NI Developer Community? Also, which SDK are you referring to?

 

Cheers,

KyleP
Applications Engineer
National Instruments
Member
KyleP
Posts: 129
0 Kudos

Re: printer dialog

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. :robothappy:

 

Cheers,

KyleP
Applications Engineer
National Instruments
Active Participant
pblase
Posts: 215
0 Kudos

Re: printer dialog

Code was attached, but I can do it again. I'm using LabWindows/CVI 2010.

Member
KyleP
Posts: 129
0 Kudos

Re: printer dialog

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,

KyleP
Applications Engineer
National Instruments
Active Participant
pblase
Posts: 215
0 Kudos

Re: printer dialog

No questions, and yes it's for people to use.

Thanks

Paul

By using this web site, you accept the Terms of Use for this web site. Please read these Terms of Use carefully before using any part of this site. Please go here for information on ni.com's copyright infringement policy.
My Profile | Privacy | Legal | Contact NI © 2011 National Instruments Corporation. All rights reserved.    |    E-Mail this Page E-Mail this Page