kaycee kaycee - 5 months ago 71
C# Question

c# textbox event for only user input

i have a Textbox control which sometimes updated programmatically and also can be update by the user.
how can i distinct between those two event ?
i'd like to have "Dirty" flag set to "true" when the user changes the text.

Answer Source

You can use the Key Down event of the text box.

      private void textBox1_KeyDown(object sender, KeyEventArgs e)
      //Insert the code you want to run when the text changes here!
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download