Exemplo n.º 1
0
 private void DrawBorder(AutoPictureBox ptb, Graphics g)
 {
     foreach (Control c in this.Controls)
     {
         if (c is AutoPictureBox)
         {
             AutoPictureBox others = c as AutoPictureBox;
             //others.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
             ControlPaint.DrawBorder(others.CreateGraphics(), others.ClientRectangle, Color.Black, 1, ButtonBorderStyle.Solid, Color.Black, 1, ButtonBorderStyle.Solid, Color.Black, 1, ButtonBorderStyle.Solid, Color.Black, 1, ButtonBorderStyle.Solid);
         }
     }
     ControlPaint.DrawBorder(g, ptb.ClientRectangle, Color.Orange, ButtonBorderStyle.Solid);
 }
Exemplo n.º 2
0
        private void ShowSelect(int index)
        {
            AutoPictureBox ptb = ptb0;

            foreach (Control c in this.Controls)
            {
                if (c is AutoPictureBox)
                {
                    ptb = c as AutoPictureBox;
                    if (ptb.Index == index)
                    {
                        ShowSelect(index, ptb);
                        DrawBorder(ptb, ptb.CreateGraphics());
                    }
                }
            }
        }