We help IT Professionals succeed at work.

VB.net TreeView change images not resizing as expected

Murray Brown
Murray Brown asked
on
Hi

I am using the following code to resize the images in my TreeView
but as you can see in the image the hight seems to not change
possiblr because it is governed ny the row height.

How do I resolve this?

Thanks


        Dim myImageList As New ImageList()
        myImageList.Images.Add(Image.FromFile("C:\P1.png"))
        myImageList.Images.Add(Image.FromFile("C:\P2.png"))
        myImageList.Images.Add(Image.FromFile("C:\P3.png"))
        myImageList.ImageSize = New Size(100, 100)

e
Comment
Watch Question

CERTIFIED EXPERT
Most Valuable Expert 2012
Top Expert 2014
Commented:
>myImageList.ImageSize = New Size(100, 100)

Images seem to be within that size to me. Have you tried

myImageList.ImageSize = New Size(32, 32)
Murray BrownASP.net/VBA/VSTO Developer

Author

Commented:
Thanks very much

Explore More ContentExplore courses, solutions, and other research materials related to this topic.