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?

Re: ImageList Errors - What a crap! by hirf-spam-me-here

hirf-spam-me-here
Mon Jun 21 11:14:54 CDT 2004

* "*Herr Lucifer" <Herr__Luciferz@yahoo.com__> scripsit:
> 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

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

--
Herfried K. Wagner [MVP]
<URL:http://dotnet.mvps.org/>

Re: ImageList Errors - What a crap! by *Herr

*Herr
Mon Jun 21 12:03:25 CDT 2004

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,

"Herfried K. Wagner [MVP]" <hirf-spam-me-here@gmx.at> wrote in message
news:2jofsfF12iavaU1@uni-berlin.de...
> * "*Herr Lucifer" <Herr__Luciferz@yahoo.com__> scripsit:
> > 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
>
> Do you use an application manifest to enable visual styles within
the
> IDE with "devenv.exe"?
>
> --
> Herfried K. Wagner [MVP]
> <URL:http://dotnet.mvps.org/>




Re: ImageList Errors - What a crap! by hirf-spam-me-here

hirf-spam-me-here
Mon Jun 21 12:47:58 CDT 2004

* "*Herr Lucifer" <Herr__Luciferz@yahoo.com__> scripsit:
> 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.

--
Herfried K. Wagner [MVP]
<URL:http://dotnet.mvps.org/>