"Marty" <xmarty99@hotmail.com> schrieb:
[quoted text, click to view] > How can I caych the double click event when it is done on the title bar
> of a form. I just want my form to be expanded or shrinked when the user
> dbl-click.
\\\
Protected Overrides Sub WndProc(ByRef m As System.Windows.Forms.Message)
Static Expanded As Boolean = True
Static Height As Integer
Const WM_NCLBUTTONDBLCLK As Int32 = &HA3
If m.Msg = WM_NCLBUTTONDBLCLK Then
If Expanded Then
Height = Me.Height
Me.Height = 0
Else
Me.Height = Height
End If
Expanded = Not Expanded
End If
MyBase.WndProc(m)
End Sub
///
--
M S Herfried K. Wagner
M V P <URL:
http://dotnet.mvps.org/>