Re: Wierd ImageList behavior
From: Harry Simpson (hssimpson_at_nospamphgt.net)
Date: 04/28/04
- Next message: Stan Adermann [Msft]: "Re: Executing unload.exe causes .Net CF apps to terminate"
- Previous message: dtaylor: "Deploying content files"
- In reply to: Harry Simpson: "Re: Wierd ImageList behavior"
- Next in thread: Serg Kuryata [MS]: "Re: Wierd ImageList behavior"
- Reply: Serg Kuryata [MS]: "Re: Wierd ImageList behavior"
- Messages sorted by: [ date ] [ thread ]
Date: Wed, 28 Apr 2004 16:55:51 -0500
Refreshing when you can answer your own questions.....
Seems the ImageList default size is 16,16 So everything coming out of it is 16,16
So when i say PictureBox1.Image = ImageList1.Images(0) , the image i'm grabbing is a 16x16 image even though the original picture was 41x41.
Only way around this is to set the ImageList ImageSize to whatever you want the picture to be displayed as (ie 41,41)
Thanks
Harry
"Harry Simpson" <hssimpson@nospamphgt.net> wrote in message news:edW3LcWLEHA.1192@TK2MSFTNGP11.phx.gbl...
a. Below the image displays just fine in the picturebox (41x41 in a 41x41 picturebox)
b. Add From ImageList button is clicked w/ the following code:
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
PictureBox1.Image = ImageList1.Images(0)
End Sub
And i get the small image which is much smaller.
c. If i change the sizemode from normal to stretchimage, it distorts the image when i load it from the imagelist.
This is got to be a bug right in the control?
Thanks,
Harry
"Harry Simpson" <hssimpson@nospamphgt.net> wrote in message news:egPZnBWLEHA.3712@TK2MSFTNGP11.phx.gbl...
> I've added five 41x41 pixel bitmaps to an ImageList. I then
> programmatically add different pictures from the imagelist into picture
> controls which too are 41x41.
>
> Setting the image propertyy for the pictureboxes works great at design time
> but during run time, the images are shrunken to 16x16 pixels before they
> appear. If I set the "shrink" they expand but are distorted as if they
> really are 16x16 pictures.
>
> Any idea what could be causing this?
>
> TIAM,
>
> Harry
>
>
- image/png attachment: ImageList.png
- Next message: Stan Adermann [Msft]: "Re: Executing unload.exe causes .Net CF apps to terminate"
- Previous message: dtaylor: "Deploying content files"
- In reply to: Harry Simpson: "Re: Wierd ImageList behavior"
- Next in thread: Serg Kuryata [MS]: "Re: Wierd ImageList behavior"
- Reply: Serg Kuryata [MS]: "Re: Wierd ImageList behavior"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|