我使用 this.Invalidate(); 清楚但一切都清楚。我只需要清楚我之前画的。
private void AfyTextBox_Paint(object sender, PaintEventArgs e)
{
if (afytransparentTextBox.BackColor.A != 255 || afytransparentTextBox.BackColor.B != 255 || afytransparentTextBox.BackColor.G != 255 || afytransparentTextBox.BackColor.R != 255)
{
path = RoundedRectangle.Create(1, 1, this.Width - 7, this.Height - 7, 2); // Draw around
e.Graphics.DrawPath(new Pen(afytransparentTextBox.BackColor), path);
}
else
{
//Here I need to clean that I drew earlier.( Draw around)
}
}