I think it might have something to do with how you are getting your graphics object. Using the graphics object from the paint eventargs has different results than using this.CreateGraphics. If you do NOT enable visual styles for the application then the results are the same.
[STAThread]
static void Main()
{
Application.SetCompatibleTextRenderingDefault(false);
Application.Run(new Form1());
}
just by enabling/disabling visual styles you can see a difference
private void Form1_Paint(object sender, PaintEventArgs e)
{
System.Drawing.Graphics graphics = this.CreateGraphics();
System.Drawing.Pen tmppen = new Pen(new SolidBrush(Color.Red), 2);
System.Drawing.Rectangle tmprect = new Rectangle(5, 5, 125, 25);
System.Drawing.Rectangle tmprect2 = new Rectangle(150, 5, 125, 25);
e.Graphics.PageUnit = GraphicsUnit.Display;
e.Graphics.DrawRectangle(tmppen, tmprect.X, tmprect.Y, tmprect.Width, tmprect.Height);
graphics.DrawRectangle(tmppen, tmprect2.X, tmprect2.Y, tmprect2.Width, tmprect2.Height);
Button btn = new Button();
btn.Location = new Point(tmprect.X, tmprect.Y);
btn.Size = new Size(tmprect.Width, tmprect.Height);
btn.Text = e.Graphics.PageUnit.ToString() + e.Graphics.PageScale.ToString() + " " + e.Graphics.DpiX + "x" + e.Graphics.DpiY;
this.Controls.Add(btn);
Button btn2 = new Button();
btn2.Location = new Point(tmprect2.X, tmprect2.Y);
btn2.Size = new Size(tmprect2.Width, tmprect2.Height);
btn2.Text = graphics.PageUnit.ToString() + graphics.PageScale.ToString() + " " + graphics.DpiX + "x" + graphics.DpiY;
this.Controls.Add(btn2);
}