Then use the OnSizeChange event handler.
Get the difference first before updating your previous dimension variables.
But how do I calculate (get) the difference without storing the original
width/heigth before the resize?
Am I overlooking something or ....
Tinus
> Then use the OnSizeChange event handler.
> Get the difference first before updating your previous dimension variables.
[quoted text clipped - 24 lines]
> > > > > Thanks,
> > > > > Tinus
Mick Doherty - 18 Sep 2004 18:43 GMT
What do you want to do with the original size?
Here's one solution in VB that will give both Old and Current Size in one
variable.
\\\
Structure FormSize
Public OldSize As Size
Public CurrentSize As Size
Public Sub New(ByVal Old As Size, ByVal Current As Size)
OldSize = Old
CurrentSize = Current
End Sub
End Structure
Private MyFormSize As New FormSize(Size.Empty, MyBase.Size)
Protected Overrides Sub OnResize(ByVal e As System.EventArgs)
MyBase.OnResize(e)
MyFormSize = New FormSize(MyFormSize.CurrentSize, Me.Size)
End Sub
///

Signature
Mick Doherty
http://dotnetrix.co.uk/nothing.html
> But how do I calculate (get) the difference without storing the original
> width/heigth before the resize?
[quoted text clipped - 35 lines]
>> > > > > Thanks,
>> > > > > Tinus