By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
443,515 Members | 1,061 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 443,515 IT Pros & Developers. It's quick & easy.

Setting cursor to show overwrite or insert mode

P: n/a
I use the RichTextBox and sometimes put it into overwrite mode.

I'd like the cursor to show whether its in overwrite or insert mode.

I often use
Cursor.Current = Cursors.WaitCursor
and therefore need to change the cursor to show the overwrite/insert mode in
such a way that when the Cursor.Current is reset after the need for the wait
cursor ends, the cursor resets to the overwrite cursor or insert cursor as
appropriate.

Thank for any help

Nov 21 '05 #1
Share this Question
Share on Google+
3 Replies


P: n/a
> I use the RichTextBox and sometimes put it into overwrite mode.

Me too.
I'd like the cursor to show whether its in overwrite or insert mode.


I'd prefer a change to the insertion caret instead of the mouse cursor.
Maybe a change from a vertical bar to a wider rectangle like in the good old
days. And I would like the rtb to handle it so I don't have to bother with
it. While MS is at it, they ought to expose an rtb property that indicates
if the rtb is in insert or overstrike mode. I'll be watching this post with
interest. Good luck to both of us.

Nov 21 '05 #2

P: n/a

"AMercer" <AM*****@discussions.microsoft.com> wrote in message
news:BA**********************************@microsof t.com...
I use the RichTextBox and sometimes put it into overwrite mode.
Me too.
I'd like the cursor to show whether its in overwrite or insert mode.


I'd prefer a change to the insertion caret instead of the mouse cursor.


Me too. Guess I got confused thinking about the cursor.

In VB6 I used to change the mode with:
SendMessage(ControlRichTextBox1.Handle, User.WM_KEYDOWN, User.VK_INSERT,
&H510001)

SendMessage(ControlRichTextBox1.Handle, User.WM_KEYUP, User.VK_INSERT,
&HC0510001)

But it doesn't seem to work with .NET

Do you change it programiccally?


Maybe a change from a vertical bar to a wider rectangle like in the good
old
days. And I would like the rtb to handle it so I don't have to bother
with
it. While MS is at it, they ought to expose an rtb property that
indicates
if the rtb is in insert or overstrike mode. I'll be watching this post
with
interest. Good luck to both of us.

Nov 21 '05 #3

P: n/a
> Do you change it programiccally?

No. I just tried a SendKeys.Send("{INS}") experiment that failed. I think
maybe it failed because of my error and/or the nature of the test program I
used. The documentation indicates that .Send or .SendWait ought to work for
you, so maybe it is worth a try. In my personal opinion, SendKeys is not
such a good idea, but maybe it will solve your problem. And there is still
no way that I know of to ask the rtb whether it is in insert or overstrike
mode.

Continuing to watch this post with interest.
Nov 21 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.