Click here to Skip to main content
65,938 articles
CodeProject is changing. Read more.
Articles / Languages / VB

Disable the Close box on a form

4.33/5 (2 votes)
17 Feb 2012CPOL 8.3K  
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

VB
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

License

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