ImageList Errors - What a crap!

H

*Herr Lucifer

Hi,

Whenever I add images to imagelist and running my application I
encounter this error:
-------
An unhandled exception of type
'System.Reflection.TargetInvocationException' occurred in mscorlib.dll
Additional information: Exception has been thrown by the target of an
invocation.

Then it highlights the following line in my application code:

Me.ImageList1.ImageStream =
CType(resources.GetObject("ImageList1.ImageStream"),
System.Windows.Forms.ImageListStreamer)
--------
Also, the value of "Me.ImageList1.ImageStream" is "Nothing".

I have looked up some Microsoft site for this, but couldn't really
solve this problem since it happens for images of every size .


Thanks in advance
---
OS = WinXP Pro
VS.Net 2003
Framework 1.1




PS: Where is all those.....Net Microsoft talked about? If they know
that DI cracks with so many exceptions, then why did they release
their product ? Doesn't any MS guy take responsibility for all these
mistakes?I have paid money for their product, you know?
 
H

Herfried K. Wagner [MVP]

* "*Herr Lucifer said:
Whenever I add images to imagelist and running my application I
encounter this error:
-------
An unhandled exception of type
'System.Reflection.TargetInvocationException' occurred in mscorlib.dll
Additional information: Exception has been thrown by the target of an
invocation.

Then it highlights the following line in my application code:

Me.ImageList1.ImageStream =
CType(resources.GetObject("ImageList1.ImageStream"),
System.Windows.Forms.ImageListStreamer)
--------
Also, the value of "Me.ImageList1.ImageStream" is "Nothing".

I have looked up some Microsoft site for this, but couldn't really
solve this problem since it happens for images of every size .


Thanks in advance

Do you use an application manifest to enable visual styles within the
IDE with "devenv.exe"?
 
H

*Herr Lucifer

Thanks a lot!
That was a really great help (I removed the manifest file.)
However, because XP style is extremely important for me in design
time, I need to view my applications appearance in their exact form
they will appear at run time in XP.
Why doesn't VS.NET support XP Style?


Thanks again,
 
H

Herfried K. Wagner [MVP]

* "*Herr Lucifer said:
That was a really great help (I removed the manifest file.)
However, because XP style is extremely important for me in design
time, I need to view my applications appearance in their exact form
they will appear at run time in XP.
Why doesn't VS.NET support XP Style?

Who knows ;-). There isn't much difference between a form shown with
styles and without styles in matters of controls' size. In VS 2005
"Whidbey", 'FlatStyle' set to 'Standard' will give a themed look in the
IDE too.
 

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