How to Highlight Picture Box c#

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • timnewport
    New Member
    • Dec 2011
    • 1

    How to Highlight Picture Box c#

    //Just change the borderstyle as i did below. I used this as if the picture boxes were buttons.


    private void PictureBoxMouse Over(object sender, EventArgs e)
    {
    unselectBox(thi s.displayPanel) ;

    try
    {
    PictureBox picBox = (PictureBox)(se nder);

    picBox.BorderSt yle = BorderStyle.Fix ed3D;
    }
    catch
    {
    return;
    }
    }

    private void unselectBox(Con trol Form)
    {
    foreach (Control cControl in Form.Controls)
    {
    if (cControl is PictureBox)
    {
    ((PictureBox)cC ontrol).BorderS tyle = BorderStyle.Non e;
    }
    }
    }
  • adriancs
    New Member
    • Apr 2011
    • 122

    #2
    Hi, thanks for the sharing

    Comment

    Working...