After the last "turning the console to TextBox", I met such a question String S = "AAAA" (char) 0 "bbbb"; console.write (s);
In this way, in the text box, since the string is finally identified "/ 0", it is displayed until "AAAA", and any console.write () will not appear. I saved this string as a text file, open with NotePad, no problem, displayed as "AAAA BBBB". So I tried to change the other control, I changed the RichtextBox to see if it can be displayed, and the result is the same as TextBox.
I happen to write a program with VB6.0, so I want to try it in VB, first use textBoxdim s = "aaaa" "BBBB" textbox.text = S effect with C #, change RichTextBoxRichTextBox .Text = s No problem, the display effect is the same as notepad. It seems that there is hope,
Open vs.net, open the COM control, find the RichTextBox control, import, turn consoleout to the newly built AxRichTextBox control, and use the code above again, the problem is set. So the automatic scroll code codebox1.setfocus (); AxRichtextBox1.selstart = AxRichtextBox1.Text.length;
But regardless of how many words in RichtextBox, the cursor can only be moved to "AAAA", and SELSTART is always = 4. Save the following method AxRichtextBox1.Setfocus (); sendKeys.send ("^ {end}");
The problem is solved. But there is still a question, which is different from the RichTextbox implementation in VB6.0 and .NET, it is different or the processing method of the string is different, and it is desirable.