show results from values in text boxes on clicking or pressing tab button

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Durairajmbd
    New Member
    • Feb 2013
    • 1

    show results from values in text boxes on clicking or pressing tab button

    I am developing application software.enteri ng two textbox value,while click or pressing tab button in third textbox, the result needs to show in third textbox.
  • gvuksa
    New Member
    • Feb 2013
    • 7

    #2
    Use Enter event in Properties window in events.
    When you enter texbox it will show result.
    Code:
    private void tbRes_Enter(object sender, EventArgs e)
            {
                // Do calculation that you want
                double res = double.Parse(tb1.Text) + double.Parse(tb2.Text);
    
                // Pass result to textbox
                tbRes.Text = res.ToString();
            }

    Comment

    Working...