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 8113137
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T02:43:53+00:00 2026-06-06T02:43:53+00:00

I have a Class(ChorNumbers) and in this class i have a Function that test

  • 0

I have a Class(ChorNumbers) and in this class i have a Function that test textbox1…17 is a Character or a Number.

I create a WindowsForm that have 9 textboxs. And if i enter 1 in the textbox1 that must jump to next textbox2 (that do this) If i enter A in the textbox2 that must jump to textbo3, but they does not jump. Where is the Problem why it doesnt not Jump??

And i want a use one textbox1_TextChanged Function.

 private void textbox1_TextChanged(object sender, EventArgs e)
 {
        TextBox myText = (TextBox)sender;
        ChorNumbers myNR = new ChorNumbers();

        bool _focused = false;
        if (myNR.CheckTextbox(myText.Name, myText.Text) == false)
            foreach (Control ctrtb in base.Controls)
                if (ctrtb is TextBox && _focused == false)
                {
                    _focused = ctrtb.Focused;
                }
                else if (ctrtb is TextBox && _focused == true)
                    ctrtb.Focus();
 }

I have solution that i dont wanna use that. I want only one textbox1 function for the other textboxs

    private void textbox3_TextChanged(object sender, EventArgs e)
    {
        TextBox myText1 = (TextBox)sender;
        ChorNumbers myNR1 = new ChorNumbers();

        if (myNR1.CheckTextbox(myText1.Name, myText1.Text) == false)
        {
            textbox4.Focus();
        }
    }
  • 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-06T02:43:55+00:00Added an answer on June 6, 2026 at 2:43 am

    By

    I have solution that i dont wanna use that. I want only one textbox1
    function for the other textboxs

    Do you mean that you only want a single call back function to be called by each textbox that then (if populated correctly) passes along to the next? If so, then that part is easy, just point each event handler to the same method (it may get complex though, unless the validation is exactly the same for each – therefore, it may be better to have one per textbox).

    I think your problem is going to be a standard one – you are trying to change focus during an event called by that control before that control is finished processing. That is, textbox1, on being populated, fires the event which you catch – in your catchment (callback) method you change the focus – now processing returns to textbox1 (on return/end of you callback method) and focus is switched bach as a by-product (because the carat is being placed ready for next update by textbox1).

    One solution is call a timed event for a few milliseconds later, then after processing returns to the textbox and it goes back into waiting for a message state, the timed event kicks off a focus (jump).

    You could also try setting enabled to force and seeing if that forces the current control to pass anyway (will need to have sorted tab stops though)

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have class B that has class A, this is simplified version of class
I have class GUI so I can create object like this: GUI g1 =
I have class with a member function that takes a default argument. struct Class
I have Class CustomDate and that is referred in other class called Test. public
I have class that represents users. Users are divided into two groups with different
i have class named Group i tried to test configuration: var cfg = new
I have class A and list of A objects. A has a function f
I have class ParentClass that observes an NSNotification. ParentClass handles the notification. ChildClass inherits
I have class class DateOptTimeType implements org.hibernate.usertype.UserType that works with two columns @org.hibernate.annotations.Type(type =
I have class in server side and I want use method of this class

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.