Step 1: Click New Project, then select Visual C# on the left, then Windows and then select Windows Forms Application. Name your project "PrintText" and then click OK
Step 2: Design your form as below

You need to add a PrintDocument, PrintPreviewDialog to your form

Step 3: Add code to handle your form
using System;
using System.Drawing;
using System.Windows.Forms;
namespace PrintText
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void printDocument1_PrintPage(object sender, System.Drawing.Printing.PrintPageEventArgs e)
{
//Draw text to your document
e.Graphics.DrawString(txtValue.Text, new Font("Times New Roman", 14, FontStyle.Bold), Brushes.Black, new PointF(100, 100));
}
private void Print_Click(object sender, EventArgs e)
{
//Open print dialog
if (printPreviewDialog1.ShowDialog() == DialogResult.OK)
printDocument1.Print();
}
}
}
VIDEO TUTORIALS