//在textbox输入10,10并回车注意中间是英文逗号
private void textBox1_KeyDown(object sender, KeyEventArgs e)
{
if (e.KeyCode == Keys.Enter)
{
string[] ss = textBox1.Text.Trim().Split(new char[] { ',' });
int x = Convert.ToInt32(ss[0]);
int y = Convert.ToInt32(ss[1]);
Graphics g = textBox1.CreateGraphics();
g.FillEllipse(Brushes.Red, new Rectangle(0, 0, x, y));
}
}