if (!System.ComponentModel.DesignerProperties.GetIsInDesignMode(this))
{
// Code which causes the designer to fail
// Stick this using segment inside the contructor
// code-behind and encapsulate all extra code
// You may also need to add it to any initialize
// or form load method if you have added extra code
}