AutoSize Issues

  • Thread starter Thread starter Joe Cool
  • Start date Start date
J

Joe Cool

I am trying to display several images on a standard Windows Form. Each
image is displayed in a PictureBox control that is 180,130 in size. I
get the Primary Screen size to determine how many images will on one
line of images. I have a form boolean variable that I set to true in
the ClientSizedChanged event handler. In the loop where I am
displaying the images, I check this boolean, and if true, I set the Y
coordinate loop counter to the actual Y location of the last image
placed.

This seems to work OK for the first line of images drawn after the
first client size changed event, but it goes haywirea after that,
drawing each image at some random location on a line, with several
lines since the last image drawn.

It seems unpredictable on just how the client size is adjusted on an
autoscroll generated event.

Any help would be appreciated.
 
Joe,

Have a look at the Anchor and Dock properties.

Trying to do it by hand will fail almost forever.
That was going when all screens had a standard rectangle.

Cor
 
Back
Top