Disabling a custom control from Visual Studio’s toolbox

When a custom control is created, Visual Studio will show it in the toolbox for dragging and dropping. This can be annoying when you create a composite control which is a combination of several other custom controls where VS will display all custom controls in the toolbox. System.ComponentModel.ToolBoxItemAttribute can be used with the controls that you want to hide from toolbox. Apply this attribute to all the controls that you want to hide from toolbox.

Sample code

[System.ComponentModel.ToolboxItem(false)]
public class MyCustomControl : Label
{
}

MyCustomControl will not be displayed on the toolbox.

Advertisements

Single click builds for different environments using Visual Studio

A neat build system is vital for all projects. Good build system should be capable to work without *any* user intervention. Here is what Joel Spolsky says on his post

Can you make a build in one step?

By this I mean: how many steps does it take to make a shipping build from the latest source snapshot? On good teams, there’s a single script you can run that does a full checkout from scratch, rebuilds every line of code, makes the EXEs, in all their various versions, languages, and #ifdef combinations, creates the installation package, and creates the final media — CDROM layout, download website, whatever.

Ask yourself the same question – Can you build your application in one step? Continue reading

Visual Studio 2010 intellisense for C++

I have downloaded a beta version of VS2010 today.  First thing I did was to test the most heard intellisense support. VC++ team has done a great job and finally intellisense for C++ is almost usable and working.

Let the screenshots speak for themselves.

VS2010 intellisense

VS2010 intellisense

Intellisense showing method description including the type used for template

Intellisense showing method description including the type used for template

Neat description about types

Neat description about types

It’s cool. Go and give it a try today!