Printing a form

  • Thread starter Thread starter Wes
  • Start date Start date
W

Wes

I have created a form with a print button on the form so
the user can click it and print out the form just as it
looks on the sreen, and it has to have every thing that
was typed in the textboxes.
 
* "Wes said:
I have created a form with a print button on the form so
the user can click it and print out the form just as it
looks on the sreen, and it has to have every thing that
was typed in the textboxes.

There is no general way to do that. You can only print parts of the
form that are currently visible on the screen. If part of the window is
outside the screen or covered by another window, it won't be captured.

Code for creating a screenshot can be found here:

<URL:http://dotnet.mvps.org/dotnet/samples/windowsandforms/downloads/Screenshot.zip>

Have a look at the 'System.Drawing.Printing' namespace and the
'PrintDocument' class for printing support in the .NET Framework.
 

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

Back
Top