private void textBox1_TextChanged(object sender, EventArgs e) { //we need to call something on text change.... if(textBox1.Text != "") { //if not empty then only do this function calculate(); } }