|
-
Nov 9th, 2002, 08:23 AM
#1
Thread Starter
Fanatic Member
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.
-
Nov 10th, 2002, 06:26 AM
#2
Thread Starter
Fanatic Member
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.
-
Nov 10th, 2002, 11:42 AM
#3
Thread Starter
Fanatic Member
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.
-
Feb 26th, 2003, 12:20 AM
#4
Member
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
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|