[Originally posted by Min]
In my program I have the form set at certain size, its got a colourful background and everything, but when I press the maximize square (at the top right of the screen) the form itself maximises, but its contents doesn't. I havent been able to find anything useful on the subject. If anyone could help Id really apreciate it. Thanks, Min.
[Originally posted by neophile]
Contents maximizing? You need to resize them manually. Usually, just record the distance between, for example, the width of the control and the width of its container.
To demonstrate, put a PictureBox on a Form, paste the following, and resize the window at runtime...
Private mW As Long
Private mH As Long
Private Sub Form_Load()
ÿ ÿ mW = Me.Width - Picture1.Width
ÿ ÿ mH = Me.Height - Picture1.Height
Private Sub Form_Resize()
ÿ ÿ On Error Resume Next
ÿ ÿ Picture1.Width = Me.Width - mW
ÿ ÿ Picture1.Height = Me.Height - mH
ÿ ÿ On Error GoTo 0
I hope this gets you started.
-- Android Development Center
-- Cloud Development Project Center
-- HTML5 Development Center
-- Windows Mobile Development Center