Everything on my form is out of sync when I try to use the ReSize control.

Last updated: January 21, 2007

We see this quite often with developers who are using maximized forms. Everything ends up a bit too large for the form at runtime. The controls at the lower right hand corner of the form run off the edge.

Cause: The problem is that ReSize always uses the size of a form in the normal state (not maximized) as the basis for its calculations even if the WindowState property is set to bring up the form in the maximized state at runtime.

Remedy: There are two ways to solve this problem.

1. Stretch out the form at design time so that the normal state size of the form is as large as the physical screen.

2. Move and size the controls on the form as design time so that they are in proper proportion to the normal state dimensions of the form. This is a bit of a pain, but it is a one-time shot. It is also a pain to work in design mode with a maximized form because in VB 4.0 the maximized form occludes the entire IDE. Making this change in VB 4 may actually save you some trouble

Copyright © 2007 by Larcom and Young.
All rights reserved. Revised: January 21, 2007.