Posts

Showing posts with the label PrintDocument

How to use Printing Controls in VB.NET??

Printing Controls provide a great way to programmer to perform Print Related Tasks. We need to draw following controls on our Windows Form PrintDialog PrintDocument PrintPreviewDialog Rich Text Box A PrintDialog control is used to open the WINDOWS Print Dialog. The PrintDialog allows user to send and output to Pinter. With the help of Print Preview Dialog, you can preview what and how it is going to be printed How to Print Document and Check Print Preview in VB.NET Print Document The PrintDocument objects holds all the information that is required to print a Pag. THey are to be associated with the control whose contents are to be printed. PrintDocument handles the concerned EVENTS and OPERATIONS We need to handle the Print_Page event of the Print Document. Write following statements at Print_Page Event of Print Document1      e.Graphics.DrawString(RichTextBox1.Text, RichTextBox1.Font, Brushes.Black, 100,100)      e. Graphics.PageUnit=Graph...