Does anyone know how I disable the "Close" ("X") button of a form in VB.NET?
Put this in your form's codebehind,
Protected Overrides ReadOnly Property CreateParams() As CreateParams
Get
Dim param As CreateParams = MyBase.CreateParams
param.ClassStyle = param.ClassStyle Or &H200
Return param
End Get
End Property
Source: here