Archive for July, 2008

Quick and dirty “dirty checking” for Windows form, C#

Wednesday, July 30th, 2008

While designing a CRF, little short-cuts can save you lots and lots of time.  This time-saver is straight-forward code-wise and should fit right into your C# code without much modification.

During CRF design time, I often have CRFs that have dozens and dozens of input controls (radio buttons, dropdowns, listboxes, textboxes…).  I’d like to add OnChange handlers to all of these input controls so that I know when a change has been made. Basically, what it comes down to is I want to know when the form is dirty, but I don’t want to add all the handlers by hand.  Fortunately, I didn’t have to and neither do you!

Read more »