How to set focus to textbox in C#

1 Answer

0 votes
namespace WinFormsApp1
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }
        
        private void button1_Click(object sender, EventArgs e)
        {
            textBox1.Focus();
        }
    }
}




/*
 * run:
 *
 * 
 * 
 */

 



answered Aug 16, 2023 by avibootz

Related questions

1 answer 146 views
1 answer 350 views
1 answer 146 views
1 answer 146 views
1 answer 160 views
1 answer 154 views
1 answer 141 views
...