Avatar of jvoros1
jvoros1 asked on

C# Printing many textboxes

Hello Expert I was wondering if you could show me how i can format the information I have to a certain layout I want it to print to the printer this is what i want it too look like

Company Number: 979734    Company Name: Willson   Year:2004
ContactName: Mike Smith

this is what my code looks like

printDialog1.Document = ThePrintDocument;
string strText = "Company Number: " + this.lblProjectNo.Text
       + "Company Name" + this.txtProjectName.Text
      + " Year " + this.txtYear.Text
      + " ContactName " + this.cmbName.Text;

But this does prints all in one line and I don't want it too can you help please.

Avatar of undefined
Last Comment

8/22/2022 - Mon

Log in or sign up to see answer
Become an EE member today7-DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform
Sign up - Free for 7 days
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
See how we're fighting big data
Not exactly the question you had in mind?
Sign up for an EE membership and get your own personalized solution. With an EE membership, you can ask unlimited troubleshooting, research, or opinion questions.
ask a question

Thanks so much it worked :)

just one thing for allignment is there such thing as \t for like tab?

yes that is right.
Experts Exchange is like having an extremely knowledgeable team sitting and waiting for your call. Couldn't do my job half as well as I do without it!
James Murphy