When you place a control on a form in the VB IDE, you are instantiating (running the code) of the control, in "design mode". This is different than "run-time mode", where you are actually executing the program. We don't want our ChartView derived user controls exectuting real-time updates via the timer while in design mode. This can lead to errors that are hard to debug and which will prevent you from adding the control to a form. That's why you see that we use 'If Me.IsDesignMode Then' to skip real-time updates if the control is being used in "design mode".
If you want to read more about design mode vs run-time mode, just enter:
.net vb "design mode"
into google. |