i've just used the readOnly
and not set the Enabled
property as well property and got this:
which is exactly what you want i think.
here is the full code
this.richTextBox1.Location = new System.Drawing.Point(31, 12);
this.richTextBox1.Name = "richTextBox1";
this.richTextBox1.ReadOnly = true;
this.richTextBox1.Size = new System.Drawing.Size(100, 96);
this.richTextBox1.TabIndex = 0;
this.richTextBox1.Text = "tsglksklsmkld";
richTextBox1.ForeColor = Color.LightGreen;
richTextBox1.SelectionColor = Color.FromArgb(0, 0, 0);
richTextBox1.BorderStyle = BorderStyle.None;
richTextBox1.BackColor = Color.FromArgb(0, 0, 0);
richTextBox1.SelectionBackColor = Color.Transparent;
richTextBox1.Font = new Font("ModeSeven", 12);
richTextBox1.Multiline = false;
if you want it to also not be selectable you can do:
this.richTextBox1.SelectionChanged += new System.EventHandler(this.richTextBox1_SelectionChanged);
and in the handler:
private void richTextBox1_SelectionChanged(object sender, EventArgs e)
{
richTextBox1.Select(0,0);
}