Create printing method more easily

0

I have a form ready and I need to keep the variables in the right fields, but I want a faster and easier way to do it. Because I do not want to waste a lot of time doing e.Graphics.DrawString because it takes a lot of time to set the right place. Is there any tool or even something I can at first show me the x and y coordinates?

        Font fonte = new Font("Arial", 12, FontStyle.Bold, GraphicsUnit.Point);
        Font fonte2 = new Font("Arial", 12, FontStyle.Regular, GraphicsUnit.Point);


        Bitmap jpg = Properties.Resources.Form2;
        Image newImage = jpg;
        e.Graphics.DrawImage(newImage, 1, 1, newImage.Width, newImage.Height);
        e.Graphics.DrawString(txtNomePaciente.Text, fonte2, Brushes.Black, 290, 285);
        e.Graphics.DrawString(txtDtNasc.Text, fonte2, Brushes.Black, 330, 305);
        e.Graphics.DrawString(txtRgPaciente.Text, fonte2, Brushes.Black, 200, 325);
        e.Graphics.DrawString(txtNomeSolicitante.Text, fonte2, Brushes.Black, 225,            345);
        e.Graphics.DrawString(txtDtAtend.Text, fonte2, Brushes.Black, 330, 365);

        if (RbSim.Checked)
        {
            e.Graphics.DrawString("X", fonte, Brushes.Black, 260, 388);
        }
        else
            e.Graphics.DrawString("X", fonte, Brushes.Black, 600, 388);

        e.Graphics.DrawString(txtDias.Text, fonte2, Brushes.Black, 355, 385);
        e.Graphics.DrawString(CbUnid.Text, fonte2, Brushes.Black, 362, 425);
        e.Graphics.DrawString(txtTele.Text, fonte2, Brushes.Black, 337, 465);

        e.Graphics.DrawString(DateTime.Now.ToString("dd                      MMMMM                            yyyy"), fonte2, Brushes.Black, 359, 527);
        e.Graphics.DrawString(DateTime.Now.ToString("dd/MM/yyyy"), fonte2, Brushes.Black, 320, 830);
        e.Graphics.DrawString(txtNomePaciente.Text, fonte2, Brushes.Black, 320, 850);
        e.Graphics.DrawString(txtDtAtend.Text, fonte2, Brushes.Black, 330, 870);
        e.Graphics.DrawString(CbUnid.Text, fonte2, Brushes.Black, 350, 890);
        e.Graphics.DrawString(txtID, fonte2, Brushes.Black, 700, 205);
        e.Graphics.DrawString(txtID, fonte2, Brushes.Black, 700, 800);
    
asked by anonymous 13.04.2015 / 15:37

0 answers