Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / .NET Framework / New Users / August 2004

Tip: Looking for answers? Try searching our database.

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

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Pawe? Skowron - 17 Aug 2004 20:26 GMT
Hi,
I have .dll with Form and ImageList component,
when I'm making instance, I got execption:

An unhandled exception of type 'System.Reflection.TargetInvocationException'
occurred in mscorlib.dll
Additional information: Exception has been thrown by the target of an
invocation.

at line:
this.imglToolBar.ImageStream =
((System.Windows.Forms.ImageListStreamer)(resources.GetObject("imglToolBar.I
mageStream")));

What is wrong?

thx in andvance

pawel
Andy Becker - 18 Aug 2004 17:18 GMT
> Hi,
> I have .dll with Form and ImageList component,
[quoted text clipped - 7 lines]
> at line:
> this.imglToolBar.ImageStream =

((System.Windows.Forms.ImageListStreamer)(resources.GetObject("imglToolBar.I
> mageStream")));
>
[quoted text clipped - 3 lines]
>
> pawel

Those kind of errors are difficult to troubleshoot.

Put a try/catch around the code which makes the instance, and examine the
InnerException property of the TargetInvocationException.  It should lead
you to a better description.  My guess is that your GetObject call is
returning Null for some reason, and the cast is failing.

Best Regards,

Andy
Pawe? Skowron - 20 Aug 2004 17:27 GMT
Any other suggestions?

> > Hi,
> > I have .dll with Form and ImageList component,
[quoted text clipped - 8 lines]
> > at line:
> > this.imglToolBar.ImageStream =

((System.Windows.Forms.ImageListStreamer)(resources.GetObject("imglToolBar.I
> > mageStream")));
> >
[quoted text clipped - 14 lines]
>
> Andy
Andy Becker - 20 Aug 2004 23:37 GMT
> Any other suggestions?

None from me.  Did you try the InnerException thing, and not get any
meaningful information?

Best Regards,

Andy

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.