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 237 views
1 answer 450 views
1 answer 248 views
1 answer 238 views
1 answer 266 views
1 answer 251 views
1 answer 233 views
...