I have a form which has certain data coming from database in to textboxes i want this form to print.while printing the textboxes are seen as a boxes,I want that shld not display as boxes but as lines i tried to change borderstyle to none but then it displays blank spaces.what can be done abt this?Any solution.Label also has the same problem.

When printing , somehow you get something like System.Drawing.Printing.PrintPageEventArgs e
This e parameter has a Graphics object.
Draw lines in it and draw the text of your TextBoxes in it.
It is just like drawing in a form, but instead the drawing will appear on printer paper. Success :)

commented: True! +15

well i understood your answer but will my textboxes take data from database since they r getting populated from database and then go for printing.

You may start to learn reporting tools - Crystal Report or Microsoft Report if you want to print result from database or follow the @Danny's (ddanbe) post.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.