I am using the code below to display the Title when printing a datagridview. How do i centre the title in the code and the Logo.
Thanks in advance
e.Graphics.DrawString(PrintTitle, New Font(dgvDisplay.Font, FontStyle.Bold), Brushes.Black, e.MarginBounds.Left, e.MarginBounds.Top - e.Graphics.MeasureString(PrintTitle, New Font(dgvDisplay.Font, FontStyle.Bold), e.MarginBounds.Width).Height + 10)
Dim img As Image = Image.FromFile("Default.jpg")
Dim ImgSize As Size = img.Size
e.Graphics.DrawImage(img, e.MarginBounds.Left, e.MarginBounds.Top - 0)