How to set focus on a textbox when a form loads in C#

1 Answer

0 votes
namespace WinFormsApp1
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
            ActiveControl = textBox1;
        }
    }
}




/*
 * run:
 *
 * 
 * 
 */


 



answered Aug 16, 2023 by avibootz

Related questions

1 answer 350 views
1 answer 136 views
136 views asked Aug 16, 2023 by avibootz
1 answer 270 views
3 answers 495 views
1 answer 166 views
...