I have a winform in that datetime picker,pay name ,amount and rupeesinwords fields.
what i want is i put blank bankcheque in the printer and fill the form and click the print button i entered data is fill in the respective places on the bank cheque
like date boxes date and payname place pay name like that.How to do this.I tried some code payname and rupees need to move below remaining working fine.If anybody already done this please help me.Thanks in Advance.
What I have tried:
private void btnprint_Click(object sender, EventArgs e)
{
PrintDocument p = new PrintDocument();
p.PrintPage += delegate(object sender1, PrintPageEventArgs e1)
{
e1.Graphics.DrawString(PrintDate, new Font("verdana", 10), new
SolidBrush(Color.Black), new RectangleF(620, 3,
p.DefaultPageSettings.PrintableArea.Width,
p.DefaultPageSettings.PrintableArea.Height));
e1.Graphics.DrawString(AccountPayee, new Font("verdana", 10), new
SolidBrush(Color.Black), new RectangleF(20, 30,
p.DefaultPageSettings.PrintableArea.Width,
p.DefaultPageSettings.PrintableArea.Height));
e1.Graphics.DrawString(PrintpayName, new Font("verdana", 10), new
SolidBrush(Color.Black), new RectangleF(55, 60,
p.DefaultPageSettings.PrintableArea.Width,
p.DefaultPageSettings.PrintableArea.Height));
e1.Graphics.DrawString(PrintRups, new Font("verdana", 10), new
SolidBrush(Color.Black), new RectangleF(90, 90,
p.DefaultPageSettings.PrintableArea.Width,
p.DefaultPageSettings.PrintableArea.Height));
e1.Graphics.DrawString(PrintAmount, new Font("verdana", 10), new
SolidBrush(Color.Black), new RectangleF(695, 120,
p.DefaultPageSettings.PrintableArea.Width,
p.DefaultPageSettings.PrintableArea.Height));
};