Disable the "Close" button of a form

Asked

Viewed 643 times

0

Does anyone know how I disable the "Close" ("X") button of a form in VB.net?

inserir a descrição da imagem aqui

1 answer

2


Put this into the codebehind of your form,

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

  • That’s what I wanted, thank you very much!

Browser other questions tagged

You are not signed in. Login or sign up in order to post.