473,379 Members | 1,245 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,379 software developers and data experts.

ImageList causes TargetInvokationException == Help!

I used VS C# to create an image list in the form designer. I then used the
list in a toolbar control. When I run the app, the ilToolBar.ImageStream
line (see code) throws a 'System.Reflection.TargetInvocationException'

I know the answer to this problem was published several months ago, but I
can't find it in my downloads.

If anyone remembers how to fix this problem please let me know.

Chuck
private void InitializeComponent()
{
....
....
....
//
// ilToolBar
//
this.ilToolBar.ImageSize = new System.Drawing.Size(16, 16);
this.ilToolBar.ImageStream =
((System.Windows.Forms.ImageListStreamer)(resource s.GetObject("ilToolBar.Ima
geStream")));
....
....
....
}
Nov 15 '05 #1
0 1183

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: What-a-Tool | last post by:
Is possible to use the windows image list for icon display in my treeview control? Would appreciate it you could point me towards a code sample or Key phrase to use in a google search. Thanks...
0
by: MB | last post by:
Hi a guys 02 questions a bout imageList please help me if you have an idea 1) I have a strange probleme with imageList, I added some images at designtime and I can see the images but at...
4
by: Chuck | last post by:
When ever I try to implement an ImageList, I always get an exception when the application runs. The ImageList doesn't even have to be used by anything. An empty ImageList doesn't throw! The...
2
by: Sanjeeva Reddy | last post by:
hai Anti Keskinen, i have used the following code MyListView->LargeImageList->ImageSize = gcnew System::Drawing::Size(100, 100); // Sets large image size to 100, 100 here i am getting error...
16
by: Roger | last post by:
....or am I missing something? Setup: - I've created an empty Winforms project, and added two buttons A and B. - Button A's Image property is set to point to a imagefile calles "users.png" -...
4
by: David | last post by:
I have a problem that just cropped up with using an ImageList in my project I am using VB .NET 200 Problem: I have existing Form with 2 Image List controls. ImageList16 (for 16x16 Images) and...
5
by: | last post by:
I do not want to setup and create my ImageList over and over again on different forms in my project. Is there any ways to achieve it? so that I will be more easy to manage my ImageList as well as...
1
by: Andrew Bullock | last post by:
Hi, Ive got a multithreaded app, which uses bgWorker.RunWorkerAsync() to run the 2nd, 3rd, ..., nth threads. I keep getting exceptions thrown by various parts of the...
4
by: Archimed | last post by:
Hi, I try to use an ImageList with a ListView but that don't work. I make a ListView in VirtualMode with LargeIcon view. I put the ImageList in the LargeImageList property. I add a bitmap...
0
by: =?Utf-8?B?aXdkdTE1?= | last post by:
hi, im getting a TargetInvokationException at Aplication.run(new Form1()); this started happening after i created two BackgroundWorkers. no errors are thrown when these are running (both download...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.