Copyright © 2003-2010 MultiMedia Soft

PaintDone event

Previous pageReturn to chapter overviewNext page


Occurs immediately after the completion of the control graphical rendering. Catching this event will allow to make further rendering on the control surface through the Graphics member of the System.Windows.Forms.PaintEventArgs object.




[Visual Basic]

Public Sub PaintDone(ByVal e As System.Windows.Forms.PaintEventArgs)



public void PaintDone(System.Windows.Forms.PaintEventArgs e);



public: void PaintDone(System::Windows::Forms::PaintEventArgs *e);








Provides data for the event: the Graphics member can be useful in order to perform further graphical rendering.



Visual Basic example


Private Sub Ctl3dPushButton1_PaintDone(ByVal e As System.Windows.Forms.PaintEventArgs) Handles Ctl3dPushButton1.PaintDone

     Dim brushRed As New SolidBrush(Color.Red)

     e.Graphics.FillEllipse(brushRed, 10, 10, 50, 50)

End Sub



Visual C# example


private void Ctl3dPushButton1_PaintDone(System.Windows.Forms.PaintEventArgs e)


     SolidBrush  brushRed = new SolidBrush (Color.Red);

     e.Graphics.FillEllipse (brushRed, 10, 10, 50, 50);              


With this code you will have the possibility to draw a red circle over the control Ctl3dPushButton1.