Software Development Network>> Visual C#>> textbox event handler?
You can use Click event for your textbox3. Code inside the click event would look something like:
double value1, value2;
if (!double.TryParse(textBox1.Text, out value1))
{
MessageBox.Show("Please enter numeric value in textBox1");
return;
}
if (!double.TryParse(textBox2.Text, out value2))
MessageBox.Show("Please enter numeric value in textBox2");
double result = value1 + value2;
textBox3.Text = result.ToString();
click event
i cant find this in event properties....
i only find this...
private void textBox1_DoubleClick(object sender, System.EventArgs e) { }
Is there anyway to solve it
Thank you for both of you ...
i tried both 'click' and 'enter', and finally i decided to use 'enter'....
thank you..
textbox event handler?
stack
You can use Click event for your textbox3. Code inside the click event would look something like:
double value1, value2;
if (!double.TryParse(textBox1.Text, out value1))
{
MessageBox.Show("Please enter numeric value in textBox1");
return;
}
if (!double.TryParse(textBox2.Text, out value2))
{
MessageBox.Show("Please enter numeric value in textBox2");
return;
}
double result = value1 + value2;
textBox3.Text = result.ToString();
kmhawkes
click event
i cant find this in event properties....
i only find this...
private void textBox1_DoubleClick(object sender, System.EventArgs e)
{
}
Is there anyway to solve it
RayMan55
Have a look at the 'Enter' event of the textbox. This one is raised when the Textbox receives focus.
ping0506
Thank you for both of you ...
i tried both 'click' and 'enter', and finally i decided to use 'enter'....
thank you..
colinrobinson