Windows Forms ImageList ArgumentOutOfRangeException: InvalidArgument=Value of '1' is not valid for 'index'.

Отвечено Windows Forms ImageList ArgumentOutOfRangeException: InvalidArgument=Value of '1' is not valid for 'index'.

  • 13 апреля 2012 г. 6:48
     
      С кодом

    Hi all,

    I have a Windows Forms application, a form with an ImageList containing 8 images loaded at design time.

    The ImageList is used in runtime in this way:

    private int IMG_GREEN = 1;
    ...
    pictureBoxStatus.Image = imageList1.Images[IMG_GREEN];
    ...

    It works fine at most computers (hundreds), but it raises exception at only one.

    Do you have any idea, where can be a problem?

    Damaged the exe file?

    Wrong assembly of .NET framework?

    Virus?

    Thanks

    Jiri

Все ответы