In a textbox, how can u prevent the display of the blinking cursor when you click on it?
I did read in some forums that there is call to a particular api but when i tried it in my code, an error was shown. Please provide the complete code for this purpose if possible and let me know if there is a particular event where the code should be executed.
This textbox is part of a form window that am creating for the simulation of a lan messenger. I am using C#. The form has two textboxes in order to resemble that of google talk. It would be desirable to prevent displaying the blinking cursor on the upper textbox.
I tried:
[DllImport("user32")]
private static extern bool HideCaret(IntPtr hWnd);
public void HideCaret() { HideCaret(TextBox1.Handle); }
I get the error: "DllImport could not be found."