Picturebox and icons bug?

  • Thread starter Thread starter Codemonkey
  • Start date Start date
C

Codemonkey

Hi,

I've come across a strange problem when using the Picturebox to display an
32x32 pixel Icon file. When first setting the "SizeMode" property to
"StretchImage", it seems to work properly (i.e. the Icon is displayed with
the full 32x32 resolution). However after closing and opening the form
designer, the image seems to revert back to 16x16 resolution which looks
horrible when stretched to the 32x32 pixel size of the picturebox.

Here's the steps I used to recreate this problem.

1) Add a picturebox to a form
2) Make it's size 32x32
3) Assign an .ico file to the picturebox's Image Property.
4) Set the "SizeMode" property to "StretchImage". Notice how the icon uses
the full 32x32 resolution.
4) Save and close the form designer.
5) Reopen the form designer - the icon now looks crap with its 16x16
resolution stretched to 32x32


I'm using VB.net in Visual Studio 2003 and .net framework 1.1

Any help anybody can give would be much appreciated.

Best Regards,

Trev.
 
* "Codemonkey said:
I've come across a strange problem when using the Picturebox to display an
32x32 pixel Icon file. When first setting the "SizeMode" property to
"StretchImage", it seems to work properly (i.e. the Icon is displayed with
the full 32x32 resolution). However after closing and opening the form

Why do you call that "propertly"? Do you have a specification that
tells that the 32 x 32 pixel icon will be used if the icon file
contains more than one image? You may want to save the icon with a
single resolution and use this icon.
 
Why do you call that "propertly"?

Well, by "properly" I expect the picturebox to show the same version of the
icon every time I close and open the designer.

If I save the form and compile the application, the Picturebox displays the
full 32x32 resolution all the time (unless I open the designer and complie
it again). Why can't the designer do the same?

You may want to save the icon with a single resolution and use this icon.
Cheers. I'll do this.


Trev.
 
* "Codemonkey said:
Well, by "properly" I expect the picturebox to show the same version of the
icon every time I close and open the designer.

I would consider this to be a bug.
 
Back
Top