Hello,
What I usually do is either add a * at the end of the field prompt, or change the background colour of the textbox. Usually the customer tells you what they prefer.
Also I use the ErrorProvider control to validate errors in the form.
for example:
private void Form1_FormClosing(object sender, FormClosingEventArgs e)
{
if (textBox1.Text == "")
{
errorProvider1.SetError(textBox1, "This is a mandatory field");
e.Cancel = true;
}
}
private void textBox1_TextChanged(object sender, EventArgs e)
{
errorProvider1.Clear();
}
By setting e.Cancel to true you prevent the form from closing.
By using the SetError method of the errorProvider1 object, you will make a little error warning flash next to the field in error.
You can add as many errorproviders as necessary.
This is very simple to use and very effective.
Valery.