Click here to Skip to main content
11,707,470 members (57,778 online)
Click here to Skip to main content
Add your own
alternative version

Form Changed Control

, 26 May 2008 CPOL 49.1K 1.1K 77
A component that allows you to monitor all the controls on the form and list any that have changed (for dirty checking)
formchangecontroltest_csharp_src.zip
Form Change Control Test CSharp
bin
Debug
Properties
Settings.settings
formchangecontrol_src.zip
Form Change Control Test
Form Change Control Test
bin
Debug
Form Change Control Test.exe
Form Change Control Test.vbproj.user
My Project
Application.myapp
Settings.settings
Form Change Control Test.suo
using System;
using System.Windows.Forms;
 
namespace Form_Change_Control_Test_CSharp
{
    /// <summary>
    /// Event argumenst for the event raised when a control is changed on a form
    /// </summary>
    public class FormChangedEventArgs: EventArgs 
    {

        private Control _controlChanged = null;
        private bool _changed = false;

        /// <summary>
        /// The control on the form that has changed
        /// </summary>
        public Control ControlChanged
        { get { return _controlChanged; } }

        /// <summary>
        /// True if the control has changed, false if it has changed back to the last saved value
        /// </summary>
        public bool Changed
        { get { return _changed; } }

        public FormChangedEventArgs(Control ControlChangedIn, bool ChangedIn)
        {
            _controlChanged = ControlChangedIn;
            _changed = ChangedIn;
        }
    }
}

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

Share

About the Author

Duncan Edwards Jones
Software Developer (Senior)
Ireland Ireland
C# / SQL Server developer
Microsoft MVP 2006, 2007
Visual Basic .NET

You may also be interested in...

| Advertise | Privacy | Terms of Use | Mobile
Web01 | 2.8.150819.1 | Last Updated 26 May 2008
Article Copyright 2007 by Duncan Edwards Jones
Everything else Copyright © CodeProject, 1999-2015
Layout: fixed | fluid