textBox1.ForeColor = Color.Black;错误 CS1061: “System.Windows.Forms.MenuItem”不包含“Black”的定义,并且找不到可接受类型为“System.Windows.Forms.MenuItem”的第一个参数的扩展方法“Black”(是否缺少 using 指令或程序集引用?)
我的using指令集如下:
using System;
using System.Linq;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Drawing.Drawing2D ;
using System.Text;
using System.Windows.Forms;
using System.Net;
using System.IO;
using System.Collections;求问为什么用不了 有其他设置字体颜色方法么?我要做文本编辑器,TextBox1为文本编辑框,要能设置其中字体颜色
我的using指令集如下:
using System;
using System.Linq;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Drawing.Drawing2D ;
using System.Text;
using System.Windows.Forms;
using System.Net;
using System.IO;
using System.Collections;求问为什么用不了 有其他设置字体颜色方法么?我要做文本编辑器,TextBox1为文本编辑框,要能设置其中字体颜色
人家提示的是这个
不是Color.Black
textBox1.ForeColor=Color.Black;可以这样写的,是不是楼主写错地方了,或者错的是其他地方,这句代码是木有错的。楼主你看下是哪里划红线的即出错地方
this.textBox1.ForeColor = System.Drawing.Color.Black;