I have a problem with a control leaking GDI handles. This is the cut-down version of the control:
Public Class FancyLabel Inherits Label Protected Overrides Sub OnPaint(ByVal e As System.Windows.Forms.PaintEventArgs) e.Graphics.TextRenderingHint = Drawing.Text.TextRenderingHint.ClearTypeGridFit MyBase.OnPaint(e) End Sub End Class
When I run the program, the GDI object count is 38.
Then I open a form that has only one FancyLabel on it and the GDI object count gets increased to 42.
I then close the form and the GDI count falls down to 39 and stays there no matter how many instances
of the form I create and close.
Any Ideas?
Thanks JV