void doc_PrintPage(object sender, PrintPageEventArgs e) { e.Graphics.DrawString(dataGridView1.CurrentRow.Cells[1].Value.ToString(), new System.Drawing.Font(new FontFamily("Arial"), 10, FontStyle.Bold), Brushes.Black, new PointF(425, 135)); e.Graphics.DrawString(dataGridView1.CurrentRow.Cells[4].Value.ToString(), new System.Drawing.Font(new FontFamily("Arial"), 10, FontStyle.Bold), Brushes.Black, new PointF(425, 150)); e.Graphics.DrawString(dataGridView1.CurrentRow.Cells[3].Value.ToString() + " TL", new System.Drawing.Font(new FontFamily("Arial"), 10, FontStyle.Bold), Brushes.Black, new PointF(425, 165)); //Burası önemli aşağıdaki kod barkodu yazan kod barcode.DrawEan13Barcode(e.Graphics, (new PointF(Convert.ToInt32(yatayText.Text), Convert.ToInt32(dikeyText.Text)))); }
void yazdir_PrintPage(object sender, PrintPageEventArgs e) { e.Graphics.DrawString("MERSİN ÜNİVERSİTESİ", new System.Drawing.Font(new FontFamily("Arial"), 8, FontStyle.Bold), Brushes.Black, new PointF(0, 10)); e.Graphics.DrawString("BİLGİ İŞLEM DAİRE BAŞKANLIĞI", new System.Drawing.Font(new FontFamily("Arial"), 6, FontStyle.Bold), Brushes.Black, new PointF(0, 25)); barkod.DrawEan13Barcode(e.Graphics, (new PointF(0, 10))); e.Graphics.DrawString(textBox4.Text, new System.Drawing.Font(new FontFamily("Arial"), 8, FontStyle.Bold), Brushes.Black, new PointF(0, 130)); e.Graphics.DrawString("Demirbaş = " + comboBox1.Text, new System.Drawing.Font(new FontFamily("Arial"), 8, FontStyle.Bold), Brushes.Black, new PointF(0, 150)); e.Graphics.DrawString("Adet = " + textBox5.Text, new System.Drawing.Font(new FontFamily("Arial"), 8, FontStyle.Bold), Brushes.Black, new PointF(0, 170)); e.Graphics.DrawString(textBox3.Text, new System.Drawing.Font(new FontFamily("Arial"), 8, FontStyle.Bold), Brushes.Black, new PointF(0, 190)); }