In my Windows form application, I have a RichTextBox and a couple of other controls. What I want is after I type some words in the text box then I move the cursor outside of the box, afterwards hit the HOME keystroke. The cursor should return the beginning of the text in the RichTextBox.
I finished this part and works out perfectly.
private void Form1_KeyDown(object sender, KeyEventArgs e)
{
if (e.KeyCode == Keys.Home)
{
richTextBox1.SelectionStart = 0;
Cursor.Position = richTextBox1.PointToScreen(richTextBox1.Location);
}
}
However I can't see the cursor, of course no blinking at all. Adding the following code is not working.
Cursor.Show();
My question is how to enable the cursor shows up?