Exemplo n.º 1
0
 private void SetPictureVisible(ref PictureBox pic, Boolean isVisible)
 {
     if (!pic.InvokeRequired)
     {
         pic.Visible = isVisible;
     }
     else
     {
         PictureBox picControl = pic;
         SetPictureVisibleDelegate setPictureBoxVisibleDelegate = new SetPictureVisibleDelegate(SetPictureVisible);
         Object[] objArray = new Object[] { pic, isVisible };
         picControl.Invoke(setPictureBoxVisibleDelegate, objArray);
     }
 }
Exemplo n.º 2
0
 private void SetPictureVisible(ref PictureBox pic, Boolean isVisible)
 {
     if (!pic.InvokeRequired)
     {
         pic.Visible = isVisible;
     }
     else
     {
         PictureBox picControl = pic;
         SetPictureVisibleDelegate setPictureBoxVisibleDelegate = new SetPictureVisibleDelegate(SetPictureVisible);
         Object[] objArray = new Object[] { pic, isVisible };
         picControl.Invoke(setPictureBoxVisibleDelegate, objArray);
     }
 }