Habilitar ou desabilitar botao
01/05/2014
0
Valeu galera. Delivery TI.
Celiol.
Posts
01/05/2014
Lucas Rocha
Em VB.NET .
Private Sub CheckBox1_Click(sender As Object, e As EventArgs) Handles CheckBox1.CheckedChanged If CheckBox1.Checked = True Then Button1.Enabled = True Else Button1.Enabled = False End If End Sub Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load Button1.Enabled = False End Sub
Em C#
namespace WindowsFormsApplication2 { public partial class Form1 : Form { public Form1() { InitializeComponent(); } private void checkBox1_Click(object sender, EventArgs e) { if(checkBox1.Checked==true) { button1.Enabled=true; } else { button1.Enabled = false; } } private void Form1_Load(object sender, EventArgs e) { button1.Enabled = false; } } }
13/05/2014
Bruno Fernandes
14/05/2014
Celiol.
Obrigado.
16/08/2018
Renato
Clique aqui para fazer login e interagir na Comunidade :)