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

  • Home
  • SEARCH
  • 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 8657387
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T15:30:29+00:00 2026-06-12T15:30:29+00:00

I’m a bit new to windows forms so I apologize if there is a

  • 0

I’m a bit new to windows forms so I apologize if there is a simple solution, but I can’t find anything on google. If I drag an item, for instance a textbox, onto the form, and double click it, the textbox_TextChanged function will be created for me. This works as expected. However, if I attempted to add a new function such as textbox_Click, it will never be called. In another project, I attempted to add a textbox_Validating function and it isn’t being called either (I made sure validating was on in the properties).

Does anyone know why only the TextChanged function is being called?

Here is what is working:

       private void textBox2_TextChanged(object sender, EventArgs e)
    {
        textBox2.BackColor = activeColor;
    } 

Here is what isn’t working:

private void textBox2_Click(object sender, EventArgs e)
    {
        textBox2.BackColor = activeColor;
    }

I’ve set a breakpoint in the textBox2_Click method and it is never being called. I’ve looked around the web and tried other methods such as _LeftMouseClick and _LeftMouseButtonDown but they aren’t working ether.

This also isn’t working:

    protected void tbNewPassword_Validating(object sender, CancelEventArgs e)
    {
        if (tbNewPassword.Text.Length < 6)
            epErrorProvider.SetError(tbNewPassword, "Your password must be 6 characters or longer.");
    }

As with the _Click method, I’ve set a breakpoint and it is never being called.

  • 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-06-12T15:30:30+00:00Added an answer on June 12, 2026 at 3:30 pm

    select the textbox, open the property window, at the top, there is a small icon that looks like a lightning (there are some other icons at the top, 1 looks like ‘A to Z’), click it, it will show all the events. Scroll down, validating is at the end. Input the validating function name, hit return key, it will show validating function in the code. add your code in there.

    This helps you add an event.

    or, you need add event handler directly, something like

       this.btnIsConnected.Click += new System.EventHandler(this.btnIsConnected_Click);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Seemingly simple, but I cannot find anything relevant on the web. What is the
I'm making a simple page using Google Maps API 3. My first. One marker
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I have just tried to save a simple *.rtf file with some websites and
I want to count how many characters a certain string has in PHP, but
I have a jquery bug and I've been looking for hours now, I can't
I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
I have a French site that I want to parse, but am running into
I want use html5's new tag to play a wav file (currently only supported
I am doing a simple coin flipping experiment for class that involves flipping a

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.