gchwang
路人甲
路人甲
  • 注册日期2005-08-01
  • 发帖数11
  • QQ
  • 铜币156枚
  • 威望0点
  • 贡献值0点
  • 银元0个
阅读:1845回复:4

各位大侠,怎样将IColor的颜色转化成System.Drawing.Color

楼主#
更多 发布于:2005-11-04 17:06
各位大侠,怎样将IColor的颜色转化成System.Drawing.Color
喜欢0 评分0
cftao2008
路人甲
路人甲
  • 注册日期2005-03-09
  • 发帖数141
  • QQ
  • 铜币568枚
  • 威望0点
  • 贡献值0点
  • 银元0个
1楼#
发布于:2005-11-07 09:22
<P>不能通过RGB来传递吗?试试看!</P>
举报 回复(0) 喜欢(0)     评分
gchwang
路人甲
路人甲
  • 注册日期2005-08-01
  • 发帖数11
  • QQ
  • 铜币156枚
  • 威望0点
  • 贡献值0点
  • 银元0个
2楼#
发布于:2005-11-07 09:35
<P><STRONG><FONT face=Verdana color=#61b713>cftao2008,能不能具体点啊,</FONT></STRONG></P>
<P><STRONG><FONT face=Verdana color=#61b713>我用   </FONT></STRONG></P>
<P><STRONG><FONT face=Verdana color=#61b713>IColor = color;</FONT></STRONG></P>
<P><STRONG><FONT face=Verdana color=#61b713>System.Drawing.Color co</FONT></STRONG></P>
<P><STRONG><FONT face=Verdana color=#61b713>int rgb = color.RGB;</FONT></STRONG></P>
<P><STRONG><FONT face=Verdana color=#61b713>co = Color.FromArgb(rgb);</FONT></STRONG></P>
<P><STRONG><FONT face=Verdana color=#61b713>button1.BackColor = co;</FONT></STRONG></P>
<P><STRONG><FONT face=Verdana color=#61b713>但显示出来的结果不对.</FONT></STRONG></P><img src="images/post/smile/dvbbs/em02.gif" />
举报 回复(0) 喜欢(0)     评分
cftao2008
路人甲
路人甲
  • 注册日期2005-03-09
  • 发帖数141
  • QQ
  • 铜币568枚
  • 威望0点
  • 贡献值0点
  • 银元0个
3楼#
发布于:2005-11-07 13:38
<P>你这用的是哪个语言啊?我怎么就看不懂呢?能不能写成VB或C!我感觉这些变量里面没什么关系!</P>
举报 回复(0) 喜欢(0)     评分
cftao2008
路人甲
路人甲
  • 注册日期2005-03-09
  • 发帖数141
  • QQ
  • 铜币568枚
  • 威望0点
  • 贡献值0点
  • 银元0个
4楼#
发布于:2005-11-07 13:52
<P>这是一段伪代码:</P>
<P>dim pColor as IColor</P>
<P>set pColor = new RGBColor</P>
<P>set pSysColor as <STRONG><FONT face=Verdana color=#61b713>System.Drawing.Color </FONT></STRONG></P>
<P><STRONG><FONT face=Verdana color=#61b713>pColor.RGB = RGB(0,0,0)   为Icolor对象赋值</FONT></STRONG></P>
<P><STRONG><FONT face=Verdana color=#61b713>pSysColor.RGB = pColor.RGB   将IColor对象的值赋给System.Drawing.Color </FONT></STRONG></P>
<P><STRONG><FONT face=Verdana color=#61b713></FONT></STRONG> </P>
举报 回复(0) 喜欢(0)     评分
游客

返回顶部