Solved

Close form button on visual basic 2008

Posted on 2010-09-02
4
323 Views
Last Modified: 2012-05-10
How to remove the close button on the top of the forms?
0
Comment
Question by:Jose Bredariol
  • 2
4 Comments
 
LVL 7

Assisted Solution

by:Alex_W
Alex_W earned 83 total points
ID: 33590010
You can change the Form Border Style proptery to none.
0
 
LVL 17

Assisted Solution

by:Zhaolai
Zhaolai earned 42 total points
ID: 33590054
Set Form's ControlBox property = False.
0
 
LVL 7

Accepted Solution

by:
Alex_W earned 83 total points
ID: 33590120
If you wanted to keep the minimize button but disable the others add this to your code:
 
Protected Overrides ReadOnly Property CreateParams() As CreateParams
        Get
            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
0
 

Author Closing Comment

by:Jose Bredariol
ID: 33590558
Thanks all
0

Featured Post

Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Article by: Kraeven
Introduction Remote Share is a simple remote sharing tool, enabling you to see, add and remove remote or local shares. The application is written in VB.NET targeting the .NET framework 2.0. The source code and the compiled programs have been in…
Creating an analog clock UserControl seems fairly straight forward.  It is, after all, essentially just a circle with several lines in it!  Two common approaches for rendering an analog clock typically involve either manually calculating points with…
Established in 1997, Technology Architects has become one of the most reputable technology solutions companies in the country. TA have been providing businesses with cost effective state-of-the-art solutions and unparalleled service that is designed…
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…

786 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question