65.9K
CodeProject is changing. Read more.
Home

Disable the Close box on a form

starIconstarIconstarIconstarIcon
emptyStarIcon
starIcon

4.33/5 (2 votes)

Feb 17, 2012

CPOL
viewsIcon

8332

This is purely a VB.NET version of what Griff posted Public Const CS_NOCLOSE As Integer = &H200 Protected Overrides ReadOnly Property CreateParams() As System.Windows.Forms.CreateParams Get Dim params As CreateParams = MyBase.CreateParams ...

This is purely a VB.NET version of what Griff posted
 Public Const CS_NOCLOSE As Integer = &H200

 Protected Overrides ReadOnly Property CreateParams() As System.Windows.Forms.CreateParams
        Get
            Dim params As CreateParams = MyBase.CreateParams
            params.ClassStyle = CS_NOCLOSE
            Return params
        End Get
    End Property