Calculate change between textbox?

1

Good night, I have 3 textbox, and I would like someone to provide a code to help me, when I select the product on the grid the total value is added in textbox1, and so on, the more I add products, the more it adds, I would like a code that when typing the value received in textbox2, the change already appeared in textbox3, I do not know if I would have to use a keypress or something, so I need help.

    
asked by anonymous 01.08.2015 / 05:29

1 answer

1

A friend example would look like this:

using System;
using System.Windows.Forms;

namespace WindowsFormsApplication1
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }

        private void textBox1_KeyUp(object sender, KeyEventArgs e)
        {
            if (e.KeyCode == Keys.Enter)
            {
                MessageBox.Show("Enter key pressed");
            }
        }
    }
}

Remember, there is always the official documentation to be consulted:

link

    
01.08.2015 / 06:32