PaintDone event
Remarks
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.
Syntax
[Visual Basic]
Public Sub PaintDone(ByVal e As System.Windows.Forms.PaintEventArgs)
[C#]
public void PaintDone(System.Windows.Forms.PaintEventArgs e);
[C++]
public: void PaintDone(System::Windows::Forms::PaintEventArgs *e);
|
Parameter
|
Description
|
|
|
|
|
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.