Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 1036311
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T14:41:00+00:00 2026-05-16T14:41:00+00:00

How can I detect changes in any control of the form in C#? As

  • 0

How can I detect changes in any control of the form in C#?

As I have many controls on one form and i need to disable a button if any of the control value in the form changes. I am in search of some built-in function/event-handler/property, and don’t want to make a customized function for that.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-16T14:41:00+00:00Added an answer on May 16, 2026 at 2:41 pm

    No, I’m not aware of any event that fires whenever any control on the form changes.

    My advice would be to subscribe to each event individually (if your form has so many controls that this is actually difficult to do, then you may want to re-think your UI).

    If you absolutely must subscribe to changes to all controls then you might want to consider something similar to the following:

    foreach (Control c in this.Controls)
    {
        c.TextChanged += new EventHandler(c_ControlChanged);
    }
    
    void c_ControlChanged(object sender, EventArgs e)
    {
    
    }
    

    Note that this wouldn’t work particularly well however if you dynamically add and remove controls to the form at runtime.

    Also, the TextChanged event might not be a suitable event for some control types (e.g. TextBoxes) – in this case you will need to cast and test the control type in order to be able to subscribe to the correct event, e.g.:

    foreach (Control c in this.Controls)
    {
        if (c is CheckBox)
        {
            ((CheckBox)c).CheckedChanged += c_ControlChanged;
        }
        else
        {
            c.TextChanged += new EventHandler(c_ControlChanged);
        }
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

How can I detect changes of ICollection<> properties (many-to-many relationships)? public class Company {
How can I detect any text changes in a textField? The delegate method shouldChangeCharactersInRange
Is there anyway I can detect via jQuery if a select form element is
Is there any way that you can detect the resizeHandlers moment of completion? something
I am unable to detect when input type=file changes its value after user selects
How does one ignore changes to a control when databinding occurs? I tried hooking
I'm trying to determine how I can detect when the user changes the Windows
My tkinter application has several controls, and I'd like to know when any changes
How can I detect changes to a specific attribute of an NSManagedObject ? In
How can I detect when a JRadioButton is changed from 'unselected' to 'selected' when

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.