ImageList error

L

Lasse Eskildsen

Hello,

When I add an imagelist to my app, and add some images to the imagelist, I
get the following error when trying to build the solution:

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

....on this line:

Me.ImageList1.ImageStream =
CType(resources.GetObject("ImageList1.ImageStream")_,
System.Windows.Forms.ImageListStreamer)
This happens every time I create a new project. I use the some images in
other projects, so they should be ok.

Does someone know how to make this work again?

Thanks in advance!
 
H

Herfried K. Wagner [MVP]

* "Lasse Eskildsen said:
When I add an imagelist to my app, and add some images to the imagelist, I
get the following error when trying to build the solution:

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

...on this line:

Me.ImageList1.ImageStream =
CType(resources.GetObject("ImageList1.ImageStream")_,
System.Windows.Forms.ImageListStreamer)
This happens every time I create a new project. I use the some images in
other projects, so they should be ok.

If you are using an application manifest with "devenv.exe" (for enabling
Visual Styles), remove it.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top