-1

I have a textbox which I want to disable focus for it How do I disable focus for Textbox with Programming

disable textbox focus using programming c# , I have used below two codes not working:

textBox1.focus()=false;

textBox1.focused()=false;
Gonçalo Peres
  • 11,752
  • 3
  • 54
  • 83
fedrick
  • 1
  • 2
  • please check this link help you. https://stackoverflow.com/questions/1140250/how-to-remove-the-focus-from-a-textbox-in-winforms – Bhushan Shimpi May 04 '19 at 07:17
  • Possible duplicate of [Random number generator only generating one random number](https://stackoverflow.com/questions/767999/random-number-generator-only-generating-one-random-number) – TechWisdom May 04 '19 at 07:44

1 Answers1

0

You can set this.ActiveControl = null; with this is your Form

private void YourForm_Load(object sender, EventArgs e)  
{ 
    this.ActiveControl = null;       
}
Hien Nguyen
  • 24,551
  • 7
  • 52
  • 62