private void textBox1_MouseDown(object sender, MouseEventArgs e)
{
if (textBox1.Text.Equals(textBoxNotice))
{
this.textBox1.ForeColor = Color.Black;
textBox1.Text = "";
}
}
private void textBox1_KeyUp(object sender, KeyEventArgs e)
{
if (textBox1.Text.Length == 0)
{
this.textBox1.ForeColor = SystemColors.ScrollBar;
textBox1.Text = textBoxNotice;
}
}
private void textBox1_KeyDown(object sender, KeyEventArgs e)
{
if (textBox1.Text.Contains(textBoxNotice))
{
this.textBox1.ForeColor = Color.Black;
textBox1.Text = textBox1.Text.Replace(textBoxNotice, "");
}
}