Pozdrav,
ako je Windows Forms aplikacija moze mada nije bas preporucljivo. Naime, mozes skloniti cursor pomocu API-ja (HideCaret/ShowCaret).
Code:
[DllImport("user32.dll")]
static extern bool HideCaret(IntPtr hWnd);
[DllImport("user32.dll")]
static extern bool ShowCaret(IntPtr hWnd);
Code:
HideCaret(txtNaziv.Handle)
ShowCaret(txtNaziv.Handle)
Ovo mozes staviti u OnEnter i OnExit event handler za datu txtNaziv kontrolu.
Ali
Citat:
HideCaret hides the caret only if the specified window owns the caret. If the specified window does not own the caret, HideCaret does nothing and returns FALSE.
Hiding is cumulative. If your application calls HideCaret five times in a row, it must also call ShowCaret five times before the caret is displayed.
treba biti oprezan. Nije preporucljivo ovo raditi i iz drugog razloga. Ako imas vise kontrola za editovanje teksta kako ces znati koji je aktivan i u kojem ce se tekst izmeniti pre nego sto otkucas neki karakter.
nije lepo da budem lud a da to ne znam