|
web
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Catch Title bar double clickHi,
I stuck on basic thing today... 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. Thanks, Marty Look up the HTCAPTION constant
Crouchie1998 BA (HONS) MCP MCSE "Marty" <xmart***@hotmail.com> wrote in message news:pCi3e.125552$ZO2.98148@edtnps84...Show quoteHide quote > Hi, > > I stuck on basic thing today... > > 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. > > Thanks, > Marty "Marty" <xmart***@hotmail.com> schrieb: \\\> 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/> V B <URL:http://classicvb.org/petition/> Thank you, exactly what I needed.
Marty Herfried K. Wagner [MVP] wrote: Show quoteHide quote > "Marty" <xmart***@hotmail.com> schrieb: > >> 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 > /// >
Opening Forms.
sorting files retrieved by OpenFileDialog Total seconds of day VB.Net Joining Paradox and SQL Server Table? MDI Child Form ? Using Comm dll file in vb.net 2003 error Binding a combo box Insert Border around a picture Who is logged on Win2003 Server? Newbie; datagrid and Excel questions |
|||||||||||||||||||||||