The original code comes from this answer:
How to animate dots in UserControl Paint event?
private void DotsTimer_Tick(object sender, EventArgs e)
{
currentDot += 1;
currentDot %= m_NumberOfDots;
dotsTimer.Interval = TimerInterval;
Invalidate();
}
I want that the interval property will show when I'm dragging the control in form1 designer like the m_DotColor for example.
This line creates the problem in the DotsTimer_Tick event:
dotsTimer.Interval = TimerInterval;
but when I'm dragging the control now into the Form's Designer, the whole project freeze shut down and Visual Studio start over again and loading the project again.
A screenshot of the PropertyGrid, without the interval part in the tick event.
I removed the line from the Tick event. In the properties, the dot color and dot active color are listed in the properties; I want to change the Interval value in the same way.
Screenshot of the control on form1 designer:
Now I can change the colors of the DotActiveColor and DotColor before running the program! The same I want to do with the Interval to be able to change the speed of the timer before running the program.


