Пример #1
0
 private void Clear_Click(object sender, EventArgs e)
 {
     using (Graphics Graph = PictBoxTask2.CreateGraphics())
     {
         Graph.Clear(Color.LightGray);
     }
 }
Пример #2
0
        private void DrawH(int x, int y, int size)
        {
            Pen myPen = new Pen(Color.Black, 1);

            using (Graphics Graph = PictBoxTask2.CreateGraphics())
            {
                Graph.DrawLine(myPen, x - size, y - size, x - size, y + size);
                Graph.DrawLine(myPen, x - size, y, x + size, y);
                Graph.DrawLine(myPen, x + size, y - size, x + size, y + size);
            }
        }