Click here to Skip to main content
15,893,622 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Hi,

I have invisible max button of mdi form of my window application,
Now please help to Prevent double click on title bar of MDI form.
Posted

1 solution

TRY this Just Copy and Paste it inside your MDI
Declare at the Top
VB
Private m_ChildFormNumber As Integer
   Public Const WM_NCLBUTTONDBLCLK As Integer = &HA3

Protected Overrides Sub WndProc(ByRef m As System.Windows.Forms.Message)
    If m.Msg = WM_NCLBUTTONDBLCLK Then Return
    MyBase.WndProc(m)
End Sub


BUT
If you set the form's MaximizeBox property to False, it not only disables the clicking of the button but it also ignores the double clicking of the title bar too.
 
Share this answer
 
v3
Comments
ajay.anilmaddi 15-Jun-12 4:28am    
Its working some time ,some times not working..
please help me
ajay.anilmaddi 15-Jun-12 4:46am    
Hi,

I have invisible max button of MDI form of my window application,
Now please help to Prevent double click on title bar of MDI form.
or Give Solution like when u click on title bar of MDI form It will be maximized ,again Double Click on MDI tille bar it willl be Minimized..Please Gide me..
ajay.anilmaddi 15-Jun-12 6:02am    
ThankQ...

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900