字體轉換:
FontConverter fc = new FontConverter();
this.fontDialog1.ShowDialog();
this.label1.Text = fc.ConvertToString(this.fontDialog1.Font);
this.label1.Font = (Font)fc.ConvertFromString(this.label1.Text);
顏色轉換
string s = cd.Color.Name;
Color c = Color.FromName(s);
ColorTranslator.FromHtml(color.ToArgb().ToString())
System.Drawing.Color 类型变量 赋值的几种类型
1.color=System.Drawing.Color.Red;
2.RGB类型:color=System.Drawing.Color.FromArgb(int,int,int);
3.二进制: System.Drawing.ColorConverter colConvert = new System.Drawing.ColorConverter();
color=(System.Drawing.Color)colConvert.ConvertFromString("#CCCCCC");