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

How to set imagelist size in code?

Probably easy, but the following does not work:
Dim imgLarge As New ImageList

imgLarge.ColorDepth = ColorDepth.Depth32Bit 'ok

imgLarge.ImageSize(64, 64) 'nope

imgLarge.ImageSize.Height = 64 'nope, get property only

Thanks,

Dean Slindee
Nov 20 '05 #1
3 5607

imgLarge.ImageSize = New Size(64, 64)

--
Eduardo A. Morcillo [MS MVP VB]
http://www.mvps.org/emorcillo
Nov 20 '05 #2
* "Dean Slindee" <sl*****@mindspring.com> scripsit:
Probably easy, but the following does not work:
Dim imgLarge As New ImageList

imgLarge.ColorDepth = ColorDepth.Depth32Bit 'ok

imgLarge.ImageSize(64, 64) 'nope

imgLarge.ImageSize.Height = 64 'nope, get property only


'imgLarge.ImageSize = New Size(64, 64)'.

--
Herfried K. Wagner [MVP]
<http://www.mvps.org/dotnet>
Nov 20 '05 #3
Dean,
As the others have pointed out, you set the you set the ImageSize property
to a new Size structure

imgLarge.ImageSize = New Size(64, 64)'.

However this will cause your images too be lost (as they are all the wrong
size now). You will need to re-add your images. In other words,
understandable, this does not cause the contained images to be scaled to the
new size.

Hope this helps
Jay

"Dean Slindee" <sl*****@mindspring.com> wrote in message
news:%2****************@TK2MSFTNGP10.phx.gbl...
Probably easy, but the following does not work:
Dim imgLarge As New ImageList

imgLarge.ColorDepth = ColorDepth.Depth32Bit 'ok

imgLarge.ImageSize(64, 64) 'nope

imgLarge.ImageSize.Height = 64 'nope, get property only

Thanks,

Dean Slindee

Nov 20 '05 #4

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: ...
2
by: Michael C | last post by:
One more quick question. I am creating a form that uses an ImageList control. I originally wanted to use a PictureBox control to display the images in the ImageList, but it doesn't seem possible....
2
by: Bob C. | last post by:
Hi All, I am using the ImageList/ListView Components to display around 100 images in C#.NET. The issue i have is, some times i may need to display the thumbnail of size more then 256x256 in...
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...
6
by: Stephen Costanzo | last post by:
In the code below I receive an exception error because the target file is being used by another process. I know this to be false because the target doesn't exist. It seems like the application...
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...
4
by: Just Me | last post by:
If I add an image to an imagelist using imageList.Images.Add... And use it with a tree node tn.ImageIndex = imageList.Images.Count-1 This is the actual code:...
6
by: henrycortezwu | last post by:
Hi, I have a WinXPSP2, P4 3.2GHZ, 1GIG RAM on my dev machine using VS2005 VB.NET. I did the following procedure: 1. Added 82 icons (128x128 in size & 32bit Depth) in an imagelist control 2....
10
by: Paul E Collins | last post by:
I want to fill an ImageList with bitmaps for a ListView from another thread, because it's a time-consuming process. I expect the ListViewItems' images to "load" one by one, as in a Web browser. ...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
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
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...
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
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...

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.