/// <summary> /// Sets the text for the specified control in multithreading circumstances. /// </summary> /// <param name="control"></param> /// <param name="text"></param> public static void SetControlPicture(PictureBox control, Image val) { if (control != null) { if (control.InvokeRequired) { SetControlPictureSafe scts = new SetControlPictureSafe(SetControlPicture); control.Invoke(scts, new Object[] { control, val }); } else { control.Image = val; } } }