Our services: SOFTWARE DEVELOPMENT,  WEB DEVELOPMENT, DATABASE DESIGN and ADMINISTRATION, ENHANCEMENT of EXISTING SOFTWARE, ENHANCEMENT of EXISTING WEB SITES, ENHANCEMENT of EXISTING DATABASE, GRAPHIC DESIGN – LOGOS, BANNERS, ICONS…, PHOTOGRAPHY: SHOOTING PHOTOS, IMPROVING AND RETOUCHING, VIDEO PRODUCTION: RECORDING VIDEOS, CREATE MOVIES, PUBLISHING, SEO – SEARCH ENGINES OPTIMISATION, SOCIAL NETWORKS – POSTS ON TWITTER, GOOGLE+, FACEBOOK, LINKEDIN.

           Search  Search  

How to hide  (disable)  ControlBox?
  More Programming ... 

  SoftFern.com on Twitter   SoftFern.com on YouTube   SoftFern.com on flickr   SoftFern.com on Pinterest
SoftFern.com on Facebook   SoftFern.com on Google+   SoftFern.com on Tumblr   SoftFern.com on LinkedIn



Our services: SOFTWARE DEVELOPMENT,  WEB DEVELOPMENT, DATABASE DESIGN and ADMINISTRATION, ENHANCEMENT of EXISTING SOFTWARE, ENHANCEMENT of EXISTING WEB SITES, ENHANCEMENT of EXISTING DATABASE, GRAPHIC DESIGN – LOGOS, BANNERS, ICONS…, PHOTOGRAPHY: SHOOTING PHOTOS, IMPROVING AND RETOUCHING, VIDEO PRODUCTION: RECORDING VIDEOS, CREATE MOVIES, PUBLISHING, SEO – SEARCH ENGINES OPTIMISATION, SOCIAL NETWORKS – POSTS ON TWITTER, GOOGLE+, FACEBOOK, LINKEDIN.


Free wallpapers of the hottest girls of the 2014 Winter Olympics

Complete guide for Euro 2012’, about 300 hundred pages filled with comprehensive information about Euro 2012


Euro 12 - teams, managers, players, fixtures, referees, the brand new ‘Tango 12’ Adidas ball and much, much more. Few hundreds amazing photos.


E-books, free e-books, Euro 2012 e-books


Auckland events in photos at bonanz.com


1 500 photos of fun-run 'Ports of Auckland Round the Bays 2012' at bonanz.com


Ocean swim - more than 1 500 photos of State King of the Bays

 

SoftFern.com Forums BonaNZ.com forums

SoftFern.com Forums - articles, news, links 

 

BonaNZ.com Forums - articles, news, links 


Photos of State King of the Bays event at bonanz.com


‘Complete guide for Euro 2012’: Given profile all 368 footballers with their photos.
 
 


‘Complete guide for Euro 2012’: Read about star players of each squad. Find out who is the key player of each team. What Pele expects of Euro 2012?



‘Complete guide for Euro 2012’: Compare annual salary of coaches participating in the Euro-2012 - and how it happened that the team of the most paid coach finished the last in their group?




‘Complete guide for Euro 2012’: Euro 2012 footballers: who are the most expensive players? Who are the Rising stars at Euro 2012?



E-books, free e-books, Euro 2012 e-books
 
  
 Popularity 
 Rating: 3.6      Rate this article   39 
 13 Aug 2011

How to hide  (disable)  ControlBox?

 






 What is the ControlBox?
The control box is the area where the user can click to access the system menu.
The system menu allows to change window size, minimize or maximize the window,
close it, etc.

You can hide ControlBox
setting ControlBox property  to false, during design time.


To hide ControlBox
during runtime, it is sufficient just one line of code (C# programming
language):


this.ControlBox = false;


And if you set Text
property of the Form to “” (empty string) you can get rid of the title as well.


    this.Text = "";


Another way to hide
ControlBox: use Windows API (Application Programming Interface).


Second way, using API:


    using System.Runtime.InteropServices;


    const int MF_BYPOSITION = 0x400;

 


    [DllImport("User32")]
    private static extern int RemoveMenu(IntPtr
hMenu, int nPosition, int wFlags);


    [DllImport("User32")]
    private static extern IntPtr
GetSystemMenu(IntPtr hWnd, bool bRevert);


    [DllImport("User32")]
    private static extern int
GetMenuItemCount(IntPtr hWnd);


    IntPtr hMenu = GetSystemMenu(this.Handle, false);


    int menuItemCount = GetMenuItemCount(hMenu);


    RemoveMenu(hMenu, menuItemCount - 1,
MF_BYPOSITION);












To hide ControlBox during runtime, it is sufficient just one line of code : this.ControlBox = false;




And if you set Text property of the Form to "" (empty string) you can get rid of the title as well.


  
  More similar links:

Pointers Basics

How to copy folder with its permissions?

Sample Credit Card Numbers for Testing Credit Card Functionality

How to fix error ‘A potentially dangerous Request.Form…’ – even when ‘ValidateRequest’ set to false.

Unsafe Code Usage in C#

How to test string for a number?

How to hide  (disable)  ControlBox?

 
    
 Rate this article from 1 to 5 

      Comments
             
 

11.07.2012    Susy

Good post. I study something more dilficuft on totally different blogs everyday. It would always be stimulating to learn content material from other writers and observe slightly something from their store. I want to make use of some with the content

              
        Add comment
Your name:
Your comment:
                      
 Tags: SoftFern Tutorials, SoftFern free Tutorials and Article, SoftFern Windows and other Operatin, SoftFern Programming Tutorials, to hide ControlBox, how to hide ControlBox, ControlBox, C# programming language, API
   More Programming ...
 


  Home page Weird We sell Programming Windows
  News Our Photos Photoshop and Photography SQL server Microsoft Office
  Tech News Our Portfolio iPad Misc Web sites development
  Videos Archive Androids Graphic design Software development
  Auckland and New Zealand About Us Tablet PCs CD/DVD presentation Play games online
  Football Contact us Round the Bays 2012 photos Ocean Swim 2012 photos Auckland Events
  Sport Our Portfolio Stock Images Stock Photos Links Exchange
  Hot Girls Our clients On Twitter Add link Site Map
  Our Twitters’ gadget Site Map Google+ Site Grid Poklonskaya.info
  Health and Beauty Site Grid Pinterest Natalia Poklonskaya.info Soft Fern forums
  Misc News Web pages Facebook Photos, images Hair & Beauty
  On YouTube CD/DVD presentaton Tumblr Daily Motion Flickr
  YouTube - 2 Graphics LinkedIn Live Journal Stumble Upon
  Vimeo - videos Tutorials - Videos Tutorials - Weird Most Popular on Internet Yahts, boats, Tall Ships

SoftFern (New Zealand LTD). 
Design and development by SoftFern 2003 - 2014 Graphics supplied by BonaNZ.com