private void button2_Click(object sender, EventArgs e) { printPreviewDialog1.Document = printDocument1; printPreviewDialog1.ShowDialog(); } private void printDocument1_PrintPage_1(object sender, System.Drawing.Printing.PrintPageEventArgs e) { if (textBox1.Text = 0) e.Graphics.DrawString(textBox1.Text, textBox1.Font, Brushes.Black, 100, 120); e.Graphics.DrawString(comboBox1.Text, comboBox1.Font, Brushes.Black, 100, 100); }
if (textBox1.Text.Length != 0) etc
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)