代码:在单击事件里面就可以实现简单的效果了 private void txt_IF_user_Click(object sender, EventArgs e) { txt_IF_user.Text = ""; txt_IF_user.ForeColor = Color.Black; }