Is there any way to disable cursor in textbox without setting property Enable to false? I was trying to use ReadOnly property but despite the fact that I can\'t write in tex
Putting the hideCaret function inside the TextChanged event will solve the problem:
[DllImport("user32.dll")] static extern bool HideCaret(IntPtr hWnd); private void textBox1_TextChanged(object sender, EventArgs e) { HideCaret(textBox1.Handle); }