2
Contributors
1
Reply
2
Views
7 Years
Discussion Span
Last Post by Medalgod
0

Printing One Text Box:

public void PrintDocument()
{
        //Create an instance of our printer class
        PCPrint printer = new PCPrint();
        //Set the font we want to use
        printer.PrinterFont = new Font("Verdana", 10);
        //Set the TextToPrint property
        printer.TextToPrint = Textbox1.Text;
        //Issue print command
        printer.Print();
}

As you can see in the above example, all we are doing is printing a string. So to print more than one format your string in the desired style... simples :)
e.g.
printer.TextToPrint = String.Format("{0}\n{1}", Textbox1.Text, Textbox2.Text);

Edited by Medalgod: Added example

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.