string转换成color

 string转换成color 

            string col = "#FF8400";
            this.BackColor = System.Drawing.ColorTranslator.FromHtml(col);

color转换成string

           Color mycolor = this.BackColor;
            string strcol = System.Drawing.ColorTranslator.ToHtml(mycolor);
            MessageBox.Show(strcol);
posted @ 2007-06-05 13:57  小y  阅读(3026)  评论(4编辑  收藏  举报