2
Answers

focus

srinath

srinath

15y
2.4k
1

hi,
I am having a user control and windows application form. In user control I have 16 buttons. and In form, I am having one textbox and this user control. I want to give focus to all these buttons in the form at runtime so that if I press on these buttons , the button text should enter in the textbox. how I need to do this.
Thanx in advance.
Answers (2)
0
Suresh M

Suresh M

NA 18.6k 1.5m 9y
write this code in new class file and you can call it any form
0
Priya M

Priya M

NA 38 4.1k 9y
I also write this code..
 
but how i will call this code on different form .
0
Suresh M

Suresh M

NA 18.6k 1.5m 9y
Regex pattern = new Regex(@"(?<!\d)\d{10}(?!\d)");

    if(pattern.isMatch(socialSecNumber))
    {
        //Do something
        return true;
    }
    else
    {
        return false;
    }
Next Recommended Forum