You should not create a control in the OnPaint Method as it is called million times. Try creating the control in the OnCreateControl method because it will be called when the control is being created.