This code defines a constant for removing the close button from a window. It overrides the CreateParams property to add that constant to the class style, preventing the close button from displaying. The constant is OR'd with the existing class style and returned, modifying the window creation parameters.
This code defines a constant for removing the close button from a window. It overrides the CreateParams property to add that constant to the class style, preventing the close button from displaying. The constant is OR'd with the existing class style and returned, modifying the window creation parameters.
This code defines a constant for removing the close button from a window. It overrides the CreateParams property to add that constant to the class style, preventing the close button from displaying. The constant is OR'd with the existing class style and returned, modifying the window creation parameters.
Private Const CP_NOCLOSE_BUTTON As Integer = &H200
Protected Overloads Overrides ReadOnly Property CreateParams() As
CreateParams Get Dim myCp As CreateParams = MyBase.CreateParams myCp.ClassStyle = myCp.ClassStyle Or CP_NOCLOSE_BUTTON Return myCp End Get End Property