I have an application with a checkbox, when I change the checked property of
the box from False to True, just this call takes 0.144 seconds. When I
change the checked property of the box from True to False, it takes 0.000
seconds. Now I don't understand why. Its only a fraction of a second, but
in my application this does matter.
Just to make sure that there were no other issues, I created a new
application, with only a checkbox, and in Sub New (after initialize
component), I set the checkbox from FALSE to TRUE, and it took 0.144 seconds.
The checkbox has all the default properties that you get when you drop it on
a form, and the call I use is:
Checkbox1.Checked = True
I don't get why there is a performance hit? When I place the call in Load
event of the Form, it doesn't take that long.
I am using Ants Profiler to get my performance times.