foreach ( Control item in this.Controls) { item.Enabled = false; }
Vous n’avez pas trouvé la réponse que vous recherchez ?
Posez votre questionforeach ( Control item in this.Controls) { if(item.Name != "nomButtonQuiGrise"){ item.Enabled = false; } }
foreach ( Control item in this.Controls) { if(item.Name != "nomButtonQuiGrise"){ item.Enabled = not item.Enabled; //on inverse l'etat sauf le bouton d'action } }