473,385 Members | 1,356 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Setting cursor to show overwrite or insert mode

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
3 5524
> 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

"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
> 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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: Christine Nguyen | last post by:
I've written a program in VB.net. I need to open a file in binary mode and edit it. I cannot find a way to partially overwrite existing data. There are certain hex values I need to replace in the...
2
by: Jeremy Moncho | last post by:
Hi guys, I am having a comprehension problem for which I cannot seem to find an answer (by banging my head on my keyboard.) I have the following code which yields no results. I expect one...
0
by: **Developer** | last post by:
I have a RichTextBox and I want to programmatically change the Insert/Overwrite mode. I tried the following but it doesn't appear to change the mode. Pressing the Insert or Ins key does change...
10
by: lgbjr | last post by:
Hi All, In VB.Net how do I determine if CapsLock is on/off (same for NumLock) and whether the input mode is set to Insert or Overwrite (Insert Key). I just added a status bar to my app, and I...
12
by: PMA | last post by:
Hi all, I am porting a web application from IE 6.0 to FireFox 1.5. I have solved almost all compatibility issues (quite a lot but not too bad) except two of them : 1) Clipboard access thru'...
1
by: laredotornado | last post by:
Hi, I'm using PHP 4.4.4 on Apache 2 on Fedora Core 5. PHP was installed using Apache's apxs and the php library was installed to /usr/local/php. However, when I set my "error_reporting"...
4
by: David Veeneman | last post by:
I'm creating a UserControl that uses a LinkLabel. For reasons that I won't bore everyone with, I don't want the LinkLable to show the default hand cursor when the mouse enters the control. Should...
2
by: Abhishek Bhatt | last post by:
I have a textbox field on my form. By default, it stays in insert mode. 1) User need to press INSERT button on the keyboard, to change it into overwite mode. Is this possible programatically? 2) I...
0
debasisdas
by: debasisdas | last post by:
Sample example to show FOR UPDATE CURSOR ----------------------------------------------------------------------------- DECLARE CURSOR EMPREC IS SELECT * FROM EMP FOR UPDATE OF SAL; MYREC...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.