473,804 Members | 4,181 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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

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

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

Before code:

ImageList.Image s.Count == 1

After:

ImageList.Image s.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 6303
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
programmaticall y resize the ImageSize property, do it before adding the
images.

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

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

Before code:

ImageList.Image s.Count == 1

After:

ImageList.Image s.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
1004
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: ImageList.Images.Count == 1 After:
1
1134
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: ImageList.Images.Count == 0 After:
3
2545
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 dataset (dataset.xsd the name is ds_BESR). How i can my datas in the datagrid into this dataset ds_BESR? Please help me...i need that. the reasen is my crystal report get the datas
3
821
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 -DirC instead of: DirA | - DirB
2
4289
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 stream, I only got all 0 byte, I don't know what is the problem. Please help me to check my error. Thanks. httpImageFile = imageFile.PostedFile; imageSize = httpImageFile.ContentLength; imageContentType = httpImageFile.ContentType; imageFileName =...
7
2102
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 treeview control set to the imagelist containing the images I want to be displayed next to each node. It seems that no matter what I do there will be no images displayed next to the nodes during runtime. I tried creating nodes during designtime using...
3
2761
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 icons are added to two ImageList objects which are bound to a ListView control, and everything looks great. I am saving the icons to a SQL Server table by using Icon.Save to a stream and assigning the byte array to the field, then loading them...
7
1162
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 point to this imagefile, it appears on the button and looks great.
2
2147
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
2169
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 folder, and this problem began when I added the functionality to have a ghost image of the folder when it is dragged and dropped to another location in the treeview. My code to create the ghost image is as follows: this.NodeToBeDeleted =...
0
9579
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10575
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10330
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
10076
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9144
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7616
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6851
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 then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
1
4297
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3816
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.