Click here to Skip to main content
15,879,239 members
Articles / Programming Languages / Visual Basic
Alternative
Tip/Trick

Disable the Close box on a form

Rate me:
Please Sign up or sign in to vote.
4.33/5 (2 votes)
17 Feb 2012CPOL 8.1K   3  
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)


Written By
Software Developer (Senior)
United Kingdom United Kingdom
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.

Comments and Discussions

 
-- There are no messages in this forum --