printing in c#

  • Thread starter Thread starter freddy
  • Start date Start date
F

freddy

I am trying to print using the printform which works fine, but I don't want
to print the form and controls I just want the text to display like:
Name: Freddy
Not
Name: the contol which show the box

If someone could just show me or give me a url where I can see how to use
printing in c# and document and margin, etc..

Remember I am new to c#

Thanks
Freddy
 
I am trying to print using the printform which works fine, but I don't want
to print the form and controls I just want the text to display like:
Name: Freddy
Not
Name: the contol which show the box

If someone could just show me or give me a url where I can see how to use
printing in c# and document and margin, etc..

See the documentation for PrintDocument class on MSDN.
 
System.Drawing.Printing.PrintDocument

It has an event called "PrintPage". This is where you'll be sending your
content to the printer.

For example, I have a TIFF image I need to print. I use
"e.Graphics.DrawImage(destImage, printPageRect);" to send my image to the
e.Graphics to draw it the way I want to (e.graphics will give you all you
need for margin headers etc.

Ertan Zanagar




I am trying to print using the printform which works fine, but I don't
want
to print the form and controls I just want the text to display like:
Name: Freddy
Not
Name: the contol which show the box

If someone could just show me or give me a url where I can see how to use
printing in c# and document and margin, etc..

See the documentation for PrintDocument class on MSDN.
 
I am trying to print using the printform which works fine, but I don't want
to print the form and controls I just want the text to display like:
Name: Freddy
Not
Name: the contol which show the box

If someone could just show me or give me a url where I can see how to use
printing in c# and document and margin, etc..

Remember I am new to c#

Thanks
Freddy

You have to use PrintDocument. But note that you are then responsible
of ALL the logic for the printing. you have to take care of calculate
the page breaks, etc
 
Back
Top