473,412 Members | 2,050 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,412 software developers and data experts.

C# - Problemīs changing the ImageSize (ImageList)

Hi, Iīm using this code for changing the size property of an ImageList :
ImageList.ImageSize = new Size(32,32);

However , the Icon property just lostīs his data.

Before code:

ImageList.Images.Count == 1

After:

ImageList.Images.Count == 0

Anyone have an idea ???

PS: The image itīs an ICO with 16x16 and 32x32. It workīs if I change the
imageSize at design time.

Sorry about my poor english and Thanks !!! :=)
Nov 22 '05 #1
1 6273
All images in an ImageList are expected to be the same size (or will be fit
into it when added). Changing the size resets the ImageList If you need to
programmatically resize the ImageSize property, do it before adding the
images.

"SpaceMind" <vi*********@hotmail.com> wrote in message
news:uQ****************@TK2MSFTNGP11.phx.gbl...
Hi, Iīm using this code for changing the size property of an ImageList :
ImageList.ImageSize = new Size(32,32);

However , the Icon property just lostīs his data.

Before code:

ImageList.Images.Count == 1

After:

ImageList.Images.Count == 0

Anyone have an idea ???

PS: The image itīs an ICO with 16x16 and 32x32. It workīs if I change the
imageSize at design time.

Sorry about my poor english and Thanks !!! :=)

Nov 22 '05 #2

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

Similar topics

1
by: SpaceMind | last post by:
Hi, Iīm using this code for changing the size property of an ImageList : ImageList.ImageSize = new Size(32,32); However , the Icon property just lostīs his data. Before code: ...
1
by: SpaceMind | last post by:
Hi, Iīm using this code for changing the size property of an ImageList : ImageList.ImageSize = new Size(32,32); However , the Icon property just lostīs his data. Before code: ...
3
by: michael haller | last post by:
In my project i have a textfile witch i import in my c# application. The datas in the textfile i show the datas in the textfile in my datagrid..ok that ist not my problem. Now i have a...
3
by: feel | last post by:
Goin' crazy with this recursive function ported from delphi... I send a string like DirA/ DirB /DirC but i get in the treeView each one in a new node.Cant get the child node....!! -DirA -DirB...
2
by: Li Zhang | last post by:
I have a problem with reading byte from a memory stream. Basically I want to resize a image and then store them to sql server. Here is part of the codes. every time I tried to read byte from...
7
by: Andrew Christiansen | last post by:
Hey everyone. I have Visual Basic .NET 2003 and am trying to show images on a treeview control. I have the imagelist on the form filled with images, and have the ImageList property of the...
3
by: Tony Lugg | last post by:
I have an application with a document management form. When users add documents to the form, I call the API function SHGetFileInfo to get the associated large and small icons for the file. These...
7
by: Roger | last post by:
Hi, I noticed a very strange problem: I made a new Winforms project, added two regular buttons, one imagelist, and added one .png image to this list. If I make button A's Image property...
2
by: JR | last post by:
Hi, I need to change the notifyicon in a countdown. after about 3000-5000 times there is an error. Here is all the code. what is wrong please help
0
by: bsturg21 | last post by:
Hello, I have an app that has a custom treeview which inherits the base treeview class and I am having a problem with the way the treeview is being redrawn. Each node in the treeview represents a...
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?
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...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...

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.