For code and comments you only need typing blocking, instead of using Enabled
" which is very restrictive and disables including events use ReadOnly
:
private void button6_Click(object sender, EventArgs e)
{
textBox4.Text = "Texto Padrão";
textBox4.ReadOnly = true;
}
To appear when you double click
it is locked for typing, it goes into the event box and uses DoubleClick
:
privatevoidtextBox4_DoubleClick(objectsender,EventArgse){MessageBox.Show("Bloqueado !!!");
}
To start the TextBox
without visibility:
Form_Load
private void Form1_Load(object sender, EventArgs e)
{
textBox4.Visible = false;
}
or properties box :