禁用双击MDI标题栏 [英] Disable double click on MDI Title bar

查看:128
本文介绍了禁用双击MDI标题栏的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



我的窗口应用程序的mdi形式有不可见的max按钮,
现在,请帮助防止双击MDI表单的标题栏.

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.

推荐答案

请尝试一下此副本并将其粘贴到MDI内
在顶部声明
TRY this Just Copy and Paste it inside your MDI
Declare at the Top
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



但是
如果将窗体的MaximizeBox属性设置为False,则不仅会禁用按钮的单击,而且还会忽略标题栏的双击.



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.


这篇关于禁用双击MDI标题栏的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆