View Single Post
  #1   Report Post  
Iceman_Aragorn
 
Posts: n/a
Default Print without seeing the print dialogue box first

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