In Windows Forms, when changing a control's font, does the control dispose the old one automatically?
If so, what if this font (the old one) is used elsewhere?
Thanks
In Windows Forms, when changing a control's font, does the control dispose the old one automatically?
If so, what if this font (the old one) is used elsewhere?
Thanks
It disposes the current font handle and sets the new font handle to the control with WM_SETFONT
You can see the source in control.cs, but not easy to folllow (search the calls to DisposeFontHandle)
Thanks.
so, if i need to use the font after the control destruction, i have to create it as many time as necessary!
The Font itself is not destroyed
If you test with a global Font that you set to a control that you destroy, and to other controls too, the font won't be destroyed
10 people are following this question.