Solved

Close form button on visual basic 2008

Posted on 2010-09-02
4
328 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

Free Tool: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Vb.net threads keep increasing 2 50
Get sourcecode path 14 47
VB.net Is there code behind PowerPivot 2 51
vb.net application has warrnings about VB6 calls. 2 19
Well, all of us have seen the multiple EXCEL.EXE's in task manager that won't die even if you call the .close, .dispose methods. Try this method to kill any excels in memory. You can copy the kill function to create a check function and replace the …
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…
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…

726 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