There's the property for a control called "DesignMode" which is set to true by the designer and is false when running the program normally.
you can prevent code from running during the design time with:
if ( !DesignMode )
{
// code to run only during runtime
}
this only applies to things that can be rendered in Design Mode (forms, custom controls, etc)