我的设计师中有一个richtextbox,我有这个代码
Imports System.Drawing
'Some codes here
'Some codes here
'Some codes here
'Some codes here
rtbDisplay.SelectionColor = Color.Red
然后每当我运行应用程序时,我都会收到此错误
'SelectionColor' is not a member of 'System.Windows.Forms.TextBox'.
虽然我已导入Imports System.Drawing
但我仍然收到此类错误。
答案 0 :(得分:0)
<强>答案:强>
我刚才意识到rtbDisplay是textbox
而不是richtextbox
。这就是为什么它不知道SelectionColor
。