Yes, the LoadCompleted event tells you what went wrong:
private void pictureBox1_LoadCompleted(object sender, AsyncCompletedEventArgs e) { if (e.Error != null) {
There may also be a case where the image was loaded correctly, but something was wrong with the image file itself:
private void pictureBox1_Paint(object sender, PaintEventArgs e) { if (pictureBox1.Image == pictureBox1.ErrorImage) {
This event handler also causes boot errors, so there may be one that you want to use.
Hans passant
source share