Link to Us

Position and Size
The position of the form is determined by x and y distance from top-left of screen

Controls position is determined by distance between top-left corner of its container (form or a container control)

size is determined by width and height of control from top-left corner
sizes and location of vb controls in form
all measurements are integers in pixels
position:top, left, bottom, right
bottom and right cannot be adjusted
Size:width and height

set position by control.location.x and control.location.y
control.location=new point(xnum, ynum)
control.size=new size(widthnum, heightnum)

You can do size and position at same time

Does not count scrollbars etc
visual basic clientsize
useful for placement calculations inside form
vb z-index
When control overlap there is a z-index that decides which control is on top

A z-index of 1 will appear above a control with z-index of 2

The last control you add is always on top by default
To get or set z-index use setchildindex() or getchildindex()

To bring a control to front of index
right-click on control and bring to front or in code or send to back

Each container tracks z-index separately
vb controls aligning
select control and set locked property to true so you do not accidentally move it
locking vb controls
As you move or resize control look for blue snap lines, they help you align the controls
Snap Lines give visual feedback to line up controls and adjusting the control’s space to the edge of the form

From the menu:
format |Align |lefts to align to the lefts of the controls selected format align
format | makesamesize\width
format|center in form
visual basic controls properties