1 using System;
2 using System.Collections.Generic;
3 using System.Linq;
4 using System.Text;
5 using System.Drawing;
6 using System.Windows.Forms;
7 using PrintableForm_chen;
8
9 namespace HundredPixelsSquare_chen
10 {
11 class HundredPixelsSquare:PrintableForm
12 {
13 static void Main(string[] args)
14 {
15 Application.Run(new HundredPixelsSquare());
16 }
17 public HundredPixelsSquare()
18 {
19 Text = "Hundred Pixels Square!";
20 }
21 protected override void DoPage(Graphics grfx, Color clr, int cx, int cy)
22 {
23 grfx.FillRectangle(new SolidBrush(clr),100,100,100,100);
24 Console.WriteLine("grfx.dpix is {0}",grfx.DpiX);
25 Console.WriteLine("grfx.dpiy is {0}",grfx.DpiY);
26 Console.WriteLine("clientsize is {0}",ClientSize);
27 }
28 }
29 }
![]()