restricting a control to be square

Hi,

i have a container control and i need it to always be square.
when placing it on the window in the ice, how can i ensure it is always as high as its wide?

Put this in the Resizing event of the container control

[code]Sub Resizing()
Static lastWidth as Integer
Static lastHeight as Integer

if me.Width <> lastWidth then
me.height = me.width
end if

if me.height <> lastHeight then
me.Width = me.Height
end if

lastWidth = me.Width
lastHeight = me.Height
End Sub
[/code]

Oh and lock the bottom and right of the control to the window.