469,924 Members | 1,361 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,924 developers. It's quick & easy.

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 5299

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 discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

2 posts views Thread by Michael C | last post: by
2 posts views Thread by Bob C. | last post: by
6 posts views Thread by Stephen Costanzo | last post: by
16 posts views Thread by Roger | last post: by
4 posts views Thread by Just Me | last post: by
6 posts views Thread by henrycortezwu | last post: by
10 posts views Thread by Paul E Collins | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.