UI线程上调用下面方法,可以画有颜色的点
private void PointPaint()
{
Graphics g = this.CreateGraphics();
//创建一把SolidBrush并用它来填充一个区域
SolidBrush brushGreen = new SolidBrush(Color.Green);
SolidBrush brushOri = new SolidBrush(this.BackColor); //表示控件的背景颜色
int x, y, r;
x = 100;
y = 100;
r = 15;
//画一个填充颜色的点
g.FillEllipse(brushOri, x, y, r, r); //恢复窗体原来的颜色
g.FillEllipse(brushGreen, x, y, r, r); //画点
}