In one of my Form derived classes, there is a line of code that causes the designer to show an error, but it is fine at run time. I thought I could use the "if( !this.DesignMode ) test to only run the line of code at run time, but this does not work and I still get the design time error. But if I say if ( this.DesignMode ), it evaulates to false both at design time and run time, so it looks like this property is always false, at design time and at run time.
There must be something special about using the DesignMode property in a Form that I am missing. Do you have any other suggestions as to how I should deal with code that seems to break my use of the designer? Its only by trial & error that I was able to narrow down to the line of code that breaks the designer, and I am still not sure what is the problem with the line of code that is causing the problem.
thanks
Bryan
There must be something special about using the DesignMode property in a Form that I am missing. Do you have any other suggestions as to how I should deal with code that seems to break my use of the designer? Its only by trial & error that I was able to narrow down to the line of code that breaks the designer, and I am still not sure what is the problem with the line of code that is causing the problem.
thanks
Bryan