Results 1 to 4 of 4

Thread: Imagelist error (resolved)

  1. #1

    Thread Starter
    Fanatic Member
    Join Date
    Apr 2002
    Posts
    638

    Unhappy Imagelist error (resolved)

    i've just been playing around with C#, and i tried adding a toolbar with an imagelist to a form, but it's throwing up this error:

    An unhandled exception of type
    'System.Reflection.TargetInvocationException' occured in mscorlib.dll

    Additional information: Exception has been thrown by the target of an invocation.

    on this line:

    Code:
    this.imlMenuIcons.ImageStream = ((System.Windows.Forms.ImageListStreamer)(resources.GetObject("imlMenuIcons.ImageStream")));
    all i did was add a toolbar, added a button to it, added an imagelist, added an image to it, then associated that image with the button. it's all done at design time, so i didn't write any of the code.

    it'll compile ok, but when i run it (in the IDE or compiled) it throws that error. any ideas what's wrong?
    Last edited by tr0n; Nov 10th, 2002 at 11:43 AM.

  2. #2

    Thread Starter
    Fanatic Member
    Join Date
    Apr 2002
    Posts
    638
    no one? well, could someone please compile an exe with a toolbar and imagelist with a button on the toolbar that has an image, just so i can see if that DLL is corrupt or something?

    thanks.

  3. #3

    Thread Starter
    Fanatic Member
    Join Date
    Apr 2002
    Posts
    638
    nevermind, i found out what was wrong. it was because i was running the VS IDE with a manifest file. i had to start the project all over again for it to work though. bugger.

  4. #4
    Thanks tr0n! You help me fixed the same error I got.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width