Visual Basic - Remove Close Button
Hello !
In this tutorial I'll teach you how you can disable/remove the close button on your windows form applications !
Start by opening or creating a windows form application.
Go to your design of form1 and click the events button at the formproperties.

Look for the event called "formclosing"

Double click the event and enter the following code:

If e.CloseReason = CloseReason.UserClosing Then
e.Cancel = True
End If
This code basically means that the User can no longer close the form, but he can still close it using the taskmanager.
If you now run your project and click the close button, it won't close!
You can also remove the close button by setting Controlbox to false in form1 properties:

Topic: Visual Basic - Remove Close Button
Date: 30/03/2013
Subject: Thanks
—————
Date: 11/01/2013
Subject: thnx
—————
Date: 24/07/2012
Subject: Hide Close button on Form - C#
—————
