-
Does anyone know how I can have a minimum size when resizing a window in VB. I can do it in the resize event but the window flickers as it is resized. I've seen some applications that manage to implement this without fickering. Any ideas.
I'm sure I've seen some example code on the net in the past but I can't find it again!
Thanks
-
try a timer then??
Code:
Dim defaultHeight, defaultWidth As Integer
Private Sub Form_Load()
Timer1.Interval = 200
Timer2.Interval = 100
End Sub
Private Sub Timer1_Timer()
If Me.Width <= defaultWidth Then
Me.Width = defaultWidth
End If
If Me.Height <= defaultHeight Then
Me.Height = defaultHeight
End If
End Sub
Private Sub Timer2_Timer()
defaultHeight = Me.Height
defaultWidth = Me.Width
Timer2.Enabled = False
End Sub
-
I have the code I can send you, but I believe on www.codeguru.com/vb , search for subclass, i believe you'll find a nice subclass dll including some examples (including 'limit resize')