I'm making a simple Notepad program in C# and in my main form I have a textbox which experiences some weird things, I have a DELETE in my Edit menu on_click I have an event
txtContent.text = "";
Also Tried
txtContent.Text = string.Empty;
And
txtContent.Clear();
but every time after that operation my Caret disappears, I thought it might be a focus issue but it is not I tried that too. Accidentally I minimized my notepad and than opened it again Cursor came back and it doesn't disappears after DELETE operation I searched the web for this issue but couldn't find anything hope you have some suggestions
Here is my Complete code, this might bring some more clarity to the issue
private void deleteToolStripMenuItem_Click(object sender, EventArgs e)
{
textBox1.Clear();
time.Interval = 20000;
time.Enabled = true;
time.Start();
time.Tick+=focus;
}
void focus(object sender, EventArgs e)
{
textbox1.Focus();
}