Visually remove/disable close button from title bar .NET

前端 未结 13 999
后悔当初
后悔当初 2020-12-03 21:51

I have been asked to remove or disable the close button from our VB .NET 2005 MDI application. There are no native properties on a form that allow you to grey out the close

13条回答
  •  忘掉有多难
    2020-12-03 22:20

    What jmweb said here is OK as well. The X close button won't go if you cancel the event on form closing. But doing so, you need to release the processes the form needs and then closing the form.

    Me.Dispose()
    Me.Close()
    

    This worked for me using Menu Strip.

提交回复
热议问题