ImageList Error.....

csharp United States
  • 18 years ago

    Every time i want to add a new image to an Image List Control (used with an ListView), when i want to run the project this error is  really ,really  @#~^!@%#&^ me !!




    Any opinions??
    Thanx!

  • 18 years ago

    That looks like a resource file/language problem (do you just have US English enabled, or have another language installed?). Have you ever had it working without this problem? What about when you create a new project, and run it then?


    Also check that the Form1.resources file exists, and see what build option is selected for that file... (click on the file, and view the properties in the properties window)

  • 18 years ago

    US enbled...Resource file exists....


    This happens when I rename the form(or/and imagelist control?)...With a new project works just fine...but i don't want to have my forms called "From1","Form2" etc ...


    Any way I added the "!@@%#$^&#" icon manually like...


    System.Drawing.Icon icnListViewProcess;
    icnListViewProcess = new Icon(Application.StartupPath +"\16x16.ico");
    imgList.Images.Add(icnListViewProcess);


    I guess the problem is with that build option...(?)
    Thanx.


    Xcuse my english.

  • 18 years ago

    It looks like you've renamed the form, but either vs.net hasn't renamed the resource file, or hasn't renamed the code pointing to the resource file. In the project explorer, click the 'Show All Files' button, and see if the form1.resources file has been renamed to a new name or not..... if it hasn't try changing it to newformname.resources

  • 18 years ago

    Build option selected for the "formname.resx"(From properties) must be Embedded Resource!
    Thanx again!!









    Xcuse my english.....

Post a reply

Enter your message below

Sign in or Join us (it's free).

Contribute

Why not write for us? Or you could submit an event or a user group in your area. Alternatively just tell us what you think!

Our tools

We've got automatic conversion tools to convert C# to VB.NET, VB.NET to C#. Also you can compress javascript and compress css and generate sql connection strings.

“In order to understand recursion, one must first understand recursion.”