In my system im making, i have a large textbox which is called remarks. when i double click on this texbox it opens a remarks entry window. I then type what i need to type in the remarks entry window textbox and then press accept (button1). The text in this textbox is then transfered into the larger textbox on the other page. How do i make the text ive just written in the remarks entry window textbox the colour red when i press the button. i dont want the whole textbox red because i have other text in the textbox i want blue like for example the date and time the remarks was entered and the user id etc.
do you know how i could have only the text i have written to be red and the date/time user id and another label on the main screen is coloured blue? Exmaple: When i type in the remarks and then press the button the textbox on the main screen should look like this:
27/04/2013 12:56:00 012345 H4067
VBBHKVB BKHSGSABSDBVJSDBSDBSDBSDBVSDBVSBVB
The date and time and the user id and the other label are at the top of the textbox and a few spaces down is the remarks that i had written.
.SelectionColor is a property of the RTB itself, not of the text. So ...
RichTextBox1.Text.SelectionColor is wrong
RichTextBox1.SelectionColor is right
As the 6-dimensional mathematics professor said to the brain surgeon, "It ain't Rocket Science!"
Reviews: "dunfiddlin likes his DataTables" - jmcilhinney
Please be aware that whilst I will read private messages (one day!) I am unlikely to reply to anything that does not contain offers of cash, fame or marriage!
This works well except for, when i execute the code more than once the blue text reverts to black and i need it to stay blue, the red seems to stay its just the blue text, other than that works like a treat!
Heres the code ive used provided on this thread. Ive taken the With and End With out as it didnt work with it (even the first time) the only thing now is it doesnt work everyother time more than once.