Re: CustomGroupBox Drawing
First up, OnPaint is a method, not an event. The OnPaint method raises the Paint event. When you override an "On" method such as OnPaint, you always call the base method to actually raise the event, e.g.
vb.net Code:
Protected Overrides Sub OnPaint(ByVal e As PaintEventArgs)
'Whatever you put here gets done BEFORE the Paint event is raised.
MyBase.OnPaint(e)
'Whatever you put here gets done AFTER the Paint event is raised.
End Sub
If you want something done before the event is raised and handled then you put the code before the base method call. If you want something done after the event is raised and handled then you put the code after the base method call.