标题栏上的Closebox

标题栏上的Closebox

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

问题描述

你好,
我如何使窗体的标题栏上的关闭框"被禁用,允许...我已经尝试过控制框,但这不是我想要的.有人可以帮忙吗?
感谢

hello,
how do i make the "closebox" on the caption bar of a form disabled allowing...I''ve tried control box but that isn''t what i want. could anyone help?
thanks

推荐答案

Private Const CP_NOCLOSE_BUTTON As Integer = &H200
Protected Overrides ReadOnly Property CreateParams() As CreateParams
    Get
        Dim myCp As CreateParams = MyBase.CreateParams
        myCp.ClassStyle = myCp.ClassStyle Or CP_NOCLOSE_BUTTON
        Return myCp
    End Get
End Property


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

08-23 12:10