Exemplo n.º 1
0
 public Form1()
 {
     InitializeComponent();
     p = new Picture(g);
     Paint += new PaintEventHandler(OnPaint);
     panel = new PaintPanel();
     panel.Location = new System.Drawing.Point(96, 41);
     panel.Size = new System.Drawing.Size(631, 510);
     panel.Parent = this;
     panel.BackColor = Color.White;
     g = panel.CreateGraphics();
     panel.MouseDown += panel1_MouseDown_1;
     panel.Anchor = AnchorStyles.Bottom | AnchorStyles.Left | AnchorStyles.Right | AnchorStyles.Top;
     p.g = g;
     p.gcontrol = panel;
     panel.Resize += Form1_Resize;
     tcolor = Color.Black;
 }
Exemplo n.º 2
0
 public Form1()
 {
     InitializeComponent();
     p                = new Picture(g);
     Paint           += new PaintEventHandler(OnPaint);
     panel            = new PaintPanel();
     panel.Location   = new System.Drawing.Point(96, 41);
     panel.Size       = new System.Drawing.Size(631, 510);
     panel.Parent     = this;
     panel.BackColor  = Color.White;
     g                = panel.CreateGraphics();
     panel.MouseDown += panel1_MouseDown_1;
     panel.Anchor     = AnchorStyles.Bottom | AnchorStyles.Left | AnchorStyles.Right | AnchorStyles.Top;
     p.g              = g;
     p.gcontrol       = panel;
     panel.Resize    += Form1_Resize;
     tcolor           = Color.Black;
 }
Exemplo n.º 3
0
 private void Form1_Resize(object sender, EventArgs e)
 {
     g   = panel.CreateGraphics();
     p.g = g;
 }