Have event fire whenever any changes made to textboxes, comboboxs, etc. inside form

后端 未结 4 1738
别跟我提以往
别跟我提以往 2021-01-13 03:52

I\'m working with a C# WinForm. It has more than a dozen text boxes, combo boxes, and check boxes. The winform displays information that is retrieved from a database. There

4条回答
  •  误落风尘
    2021-01-13 04:41

    You can have all of the events hooked up to one handler, just have them all call the same function, there you have a bool flag mbSomethingChanged = true and enable the save button. Check the flag on form close, if you want to alert the user to save.

提交回复
热议问题