Hi, I have an application that uses the richtextbox control in vb.net as the main input/output mechanism.
To add text into the control I am using the .AppendText method which not only adds the text, but places the cursor on a newline. I don't want this. I want to append the text into the control and have the caret sit right at the end of the appended text waiting for user input (kind of like a command prompt).
I can of course resize the array that stores the text for the control (to get rid of the last newline), and then reposition the cursor but this introduces its own problems whereby the last line is removed before .AppendText has finished adding text to the control. The result makes me unhappy
Does anyone know hoe to stop AppendText from doing this, or, (less desirably) how I can be sure that AppendText has finished before the next part of my code executes and removes the last line ?
Any other suggestions will be gratefully accepted !
-Paul.
To add text into the control I am using the .AppendText method which not only adds the text, but places the cursor on a newline. I don't want this. I want to append the text into the control and have the caret sit right at the end of the appended text waiting for user input (kind of like a command prompt).
I can of course resize the array that stores the text for the control (to get rid of the last newline), and then reposition the cursor but this introduces its own problems whereby the last line is removed before .AppendText has finished adding text to the control. The result makes me unhappy
Does anyone know hoe to stop AppendText from doing this, or, (less desirably) how I can be sure that AppendText has finished before the next part of my code executes and removes the last line ?
Any other suggestions will be gratefully accepted !
-Paul.