R
Rina
Hi,
I have a win form in VB.net that I want the user to be
only able to resize it's height (not the width!).
Is there an obvious way to do this?
I have tried to put some values in MinimumSize and
MaximumSize but it does not seem to affect the form.
I have tried to following, it works but it is not
nice visually (it shakes on resize):
Private Sub OnFormResize(ByVal sender As Object, ByVal e
As EventArgs) Handles MyBase.Resize
If Me.Size.Width > Me.MaximumSize.Width Then
Me.Size = New Size(Me.MaximumSize.Width,
Me.Size.Height)
End If
If Me.Size.Width < Me.MinimumSize.Width Then
Me.Size = New Size(Me.MinimumSize.Width,
Me.Size.Height)
End If
End Sub
any help would be great!
thanks,
Rina
..
I have a win form in VB.net that I want the user to be
only able to resize it's height (not the width!).
Is there an obvious way to do this?
I have tried to put some values in MinimumSize and
MaximumSize but it does not seem to affect the form.
I have tried to following, it works but it is not
nice visually (it shakes on resize):
Private Sub OnFormResize(ByVal sender As Object, ByVal e
As EventArgs) Handles MyBase.Resize
If Me.Size.Width > Me.MaximumSize.Width Then
Me.Size = New Size(Me.MaximumSize.Width,
Me.Size.Height)
End If
If Me.Size.Width < Me.MinimumSize.Width Then
Me.Size = New Size(Me.MinimumSize.Width,
Me.Size.Height)
End If
End Sub
any help would be great!
thanks,
Rina
..