Print without seeing the print dialogue box first

I

Iceman_Aragorn

I currently have a C# application (a touchscreen app), and after collecting
some data from the user and other sources, the user can press a button
labeled print, just a regular old button.
I have a print class set up such that it'll print the stuff in the textboxes
to the printer, but when you press the button, it just brings up the print
dialogue box...you select the printer, and press ok.

The thing is, i want to skip that step, and just automatically print when
you press the big button on the form that i labeled print. I don't want to
skip the whole windows API and use dos or something like that, I just want to
print, and have the settings normally set by that print dialogue box to be
taken from, say, a little xml config file instead.

So what I need to figure out is, how do i make the print event not bring up
the print dialogue first,
and second, what the properties are that i have to call to set the print
settings that would, in this case, be set up by a file rather than the
dialogue.

So to recap, I want to print the text in a bunch of textboxes on a form
directly to the printer by pressing a single windows form button.

Thanks
 
S

Suzanne S. Barnhill

There are two print commands in Word: FilePrint, which brings up the dialog,
and FilePrintDefault, which prints the entire document using the current
settings.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top