Close form button on visual basic 2008

How to remove the close button on the top of the forms?
Jose BredariolPMPAsked:
Who is Participating?

Improve company productivity with a Business Account.Sign Up

Alex_WConnect With a Mentor Commented:
If you wanted to keep the minimize button but disable the others add this to your code:
Protected Overrides ReadOnly Property CreateParams() As CreateParams
            Dim cp As CreateParams = MyBase.CreateParams
            Const CS_DBLCLKS As Int32 = &H8
            Const CS_NOCLOSE As Int32 = &H200
            cp.ClassStyle = CS_DBLCLKS Or CS_NOCLOSE
            Return cp
        End Get
    End Property
Alex_WConnect With a Mentor Commented:
You can change the Form Border Style proptery to none.
ZhaolaiConnect With a Mentor Commented:
Set Form's ControlBox property = False.
Jose BredariolPMPAuthor Commented:
Thanks all
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.