printing in c#

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
 
P

Pavel Minaev

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.
 
E

Ertan Zanagar

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

Ignacio Machin ( .NET/ C# MVP )

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
 

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