on button click event use public method Hide to conceal the form.
Hiding the control is equivalent to setting the Visible property to false. After the Hide method is called, the Visible property returns a value of false until the Show method is called.
Okay maybe I wasn't very clear. I want the cross on the child window (you know, the close button - next to the minimize and restore buttons!) to be disabled.
Alternatively I want to be able to access (override maybe) the close event, and hide the form instead of closing. (I know how to hide a form...)
You need to handle the Closing event and set the cancel event argument to True. Then hide the form
Private Sub FormClosing(ByVal sender As System.Object, ByVal e As System.ComponentModel.CancelEventArgs) Handles MyBase.Closing
e.Cancel = True
Me.Hide()
End Sub
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.