Dim TextLen As IntegerText1.SetFocusText1.Text = "·°★·°∴° ☆.·°∴°.☆°★°∴°"TextLen = Len(Text1.Text)Text1.Text = Text1.Text & "1234"Text1.SelStart = TextLenText1.SelLength = 2*****************************************Dim TextLen As IntegerRichTextBox1.SetFocusRichTextBox1.Text = "·°★·°∴° ☆.·°∴°.☆°★°∴°"TextLen = Len(RichTextBox1.Text)RichTextBox1.Text = RichTextBox1.Text & "1234"RichTextBox1.SelStart = TextLenRichTextBox1.SelLength = 2同样的两段代码,用在richtextbox和textbox上为什么结果不同呢?是richtextbox的bug么?有什么解决方法?谢谢
因为在我这里是正常的。windows 2000 server
使用同一种字体不同的字体集结果将完全不同。如:
字体为"宋体"
1、字体集为"CHINESE_GB2312"显示结果正常,都选中了"12"2、字体集为"西方"显示就不同了,TextBox选中了"12",而RichTextBox则选中了"34 ",注意后面还有一个回车符注:在RichTextBox中使用查找时,如果查找半个字符的字将会出错。
在哪里修改??
多谢~~~
http://community.csdn.net/Expert/topic/3546/3546908.xml?temp=.8368341