PC Review


Reply
Thread Tools Rate Thread

Catch Title bar double click

 
 
Marty
Guest
Posts: n/a
 
      1st Apr 2005
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
 
Reply With Quote
 
 
 
 
Crouchie1998
Guest
Posts: n/a
 
      1st Apr 2005
Look up the HTCAPTION constant

Crouchie1998
BA (HONS) MCP MCSE



"Marty" <(E-Mail Removed)> wrote in message
newsCi3e.125552$ZO2.98148@edtnps84...
> 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



 
Reply With Quote
 
Herfried K. Wagner [MVP]
Guest
Posts: n/a
 
      1st Apr 2005
"Marty" <(E-Mail Removed)> 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/>
 
Reply With Quote
 
Marty
Guest
Posts: n/a
 
      1st Apr 2005
Thank you, exactly what I needed.
Marty

Herfried K. Wagner [MVP] wrote:

> "Marty" <(E-Mail Removed)> 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
> ///
>

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Tools to catch double comparisonOperator double Dave Harris Microsoft C# .NET 0 27th May 2009 11:46 PM
Disable double-click on title bar maximizes window? David Deley Windows XP Basics 0 25th Oct 2007 09:16 PM
Disable double-click on title bar maximizes window? David Deley Windows XP Help 0 23rd Oct 2007 01:40 AM
Double click on Form Title bar kiran Microsoft C# .NET 1 23rd Sep 2005 02:20 PM
Defeating Window Maximization on Double-Click of Title Bar?? =?Utf-8?B?dGtyaWVn?= Windows XP Basics 2 29th Apr 2005 03:35 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 07:02 PM.