Click here to Skip to main content
Click here to Skip to main content

Tagged as

Hiding the Control Box in Windows Application

, 10 Apr 2014 CPOL
Rate this:
Please Sign up or sign in to vote.
Hiding the control box like minimize, maximize, close button in Windows application

Introduction

In this tip, I will show how you can hide the control box like minimize, maximize, close button and change the look feel of your windows application form.

You can change the look and feel of login form in Windows application by the hiding of minimize, maximize, close button.

To change the look and feel, follow the steps given below.

Step 1: Create a Windows application named ‘Windows App’.

Step 2: Add a label and change the text like name of your application in your default form named ‘Form1’.

Add some more functionality like

  • Add some controls like button, label, textbox and groupbox
  • Change the background color of form via properties->background color

Step 3: Run the application

Purpose

Hide the control box like minimize, maximize, close button and change the look and feel of the form.

Solution

  1. Change the ‘FormBorderStyle’ property of the form as ‘None’ instead of default value ‘sizable’.

  2. Run the application and see the form.

  3. But here is a drawback like how to close the application if user wants, so you have to add close button for closing on the form.

  4. Call the close() method on click event of the close button to close the form.
    private void button2_Click(object sender, EventArgs e)
    {
        Close();
    } 

  5. Run the application and check it.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

Share

About the Author

Rahul_Bansal
Software Developer (Senior)
India India
No Biography provided

Comments and Discussions

 
GeneralMy vote of 1 PinmemberKseg9715-Apr-14 19:00 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.

| Advertise | Privacy | Terms of Use | Mobile
Web04 | 2.8.141223.1 | Last Updated 10 Apr 2014
Article Copyright 2014 by Rahul_Bansal
Everything else Copyright © CodeProject, 1999-2014
Layout: fixed | fluid