将String转换为COlor
我决定开始一个新线程。我有xml文件格式的输出。它看起来像这样:
这样:
< P1JoyUp>
< Top> 326< / Top>
< Left> 54< / left>
<高度> 23< /高度>
<宽度> 100< /宽度>
<可见>真< /可见>
< ForeColor>颜色[白色]< / ForeColor>
< BackColor>颜色[透明]< / BackColor>
< Font> [字体:名称= Microsoft Sans Serif,大小= 8.25,单位= 3,
GdiCharSet = 0,GdiVerticalFont = False ]< / Font>
< / P1JoyUp>
我写出来并使用数据集读取它。现在,当我阅读它时,我需要
将forecolor和backcolor字符串转换为system.drawing.something。
我需要寻找答案。 />
谢谢,
John
I decided to start a new thread. I have output in xml file format. It looks
like this:
<P1JoyUp>
<Top>326</Top>
<Left>54</Left>
<Height>23</Height>
<Width>100</Width>
<Visible>True</Visible>
<ForeColor>Color [White]</ForeColor>
<BackColor>Color [Transparent]</BackColor>
<Font>[Font: Name=Microsoft Sans Serif, Size=8.25, Units=3,
GdiCharSet=0, GdiVerticalFont=False]</Font>
</P1JoyUp>
I write it out and read it in using a data set. Now when I read it in I need
to convert the forecolor and backcolor strings to system.drawing.something.
WHere do I need to look for an answer.
Thanks,
John
您是否尝试过将颜色转换为颜色类?
" jcrouse" <乔********* @ comcast.net>在消息中写道
news:uT ************** @ tk2msftngp13.phx.gbl ...
Have you tried converting to a color in the color class?
"jcrouse" <jo*********@comcast.net> wrote in message
news:uT**************@tk2msftngp13.phx.gbl...
我决定开始一个新线程。我有xml文件格式的输出。
看起来像这样:
< P1JoyUp>
< Top> 326< / Top>
< Left> 54< / Left>
<高度> 23< /高度>
<宽度> 100< /宽度>
<可见>真< /可见>
< ForeColor>颜色[白色]< / ForeColor>
< BackColor>颜色[透明]< / BackColor>
<字体> [字体:名称= Microsoft Sans Serif,尺寸= 8.25,单位= 3,
GdiCharSet = 0,GdiVerticalFont = False]< / Font>
< / P1JoyUp>
我写出来并使用数据集读取它。现在,当我在I
中读取它时,需要将forecolor和backcolor字符串转换为
system.drawing.something。我需要寻找答案。
谢谢,
约翰
I decided to start a new thread. I have output in xml file format. It looks like this:
<P1JoyUp>
<Top>326</Top>
<Left>54</Left>
<Height>23</Height>
<Width>100</Width>
<Visible>True</Visible>
<ForeColor>Color [White]</ForeColor>
<BackColor>Color [Transparent]</BackColor>
<Font>[Font: Name=Microsoft Sans Serif, Size=8.25, Units=3,
GdiCharSet=0, GdiVerticalFont=False]</Font>
</P1JoyUp>
I write it out and read it in using a data set. Now when I read it in I need to convert the forecolor and backcolor strings to system.drawing.something. WHere do I need to look for an answer.
Thanks,
John
我'我正在看Color类和typeconverters,但我不理解
typedescriptor参数或他们在msdn帮助中给出的例子。
John
" Scott M." < S - *** @ nospam.nospam>在消息中写道
新闻:uW ************** @ TK2MSFTNGP09.phx.gbl ...
I''m looking at the Color class and typeconverters but I dont'' understand the
typedescriptor parameter or the example they give in the msdn help.
John
"Scott M." <s-***@nospam.nospam> wrote in message
news:uW**************@TK2MSFTNGP09.phx.gbl...
你试过转换为颜色类中的颜色?
" jcrouse" <乔********* @ comcast.net>在消息中写道
新闻:uT ************** @ tk2msftngp13.phx.gbl ...
Have you tried converting to a color in the color class?
"jcrouse" <jo*********@comcast.net> wrote in message
news:uT**************@tk2msftngp13.phx.gbl...
我决定开始一个新线程。我有xml文件格式的输出。它
I decided to start a new thread. I have output in xml file format. It
看起来像这样的
looks
:
< P1JoyUp>
< Top> 326< / Top>
< Left> 54< / Left>
< Height> 23< / Height>
< Width> 100< / Width>
< Visible> True< / Visible>
< ForeColor>颜色[白色]< / ForeColor>
< BackColor>颜色[透明]< / BackColor>
<字体> [字体:名称= Microsoft Sans Serif,尺寸= 8.25,单位= 3,
GdiCharSet = 0,GdiVerticalFont = False]< / Font>
< / P1JoyUp>
我写出来并在使用中阅读一个数据集。现在,当我在
like this:
<P1JoyUp>
<Top>326</Top>
<Left>54</Left>
<Height>23</Height>
<Width>100</Width>
<Visible>True</Visible>
<ForeColor>Color [White]</ForeColor>
<BackColor>Color [Transparent]</BackColor>
<Font>[Font: Name=Microsoft Sans Serif, Size=8.25, Units=3,
GdiCharSet=0, GdiVerticalFont=False]</Font>
</P1JoyUp>
I write it out and read it in using a data set. Now when I read it in I
中读取它时,需要
将forecolor和backcolor字符串转换为
to convert the forecolor and backcolor strings to
system.drawing.something。
system.drawing.something.
我需要寻找答案。
谢谢,
John
WHere do I need to look for an answer.
Thanks,
John
CType(colorString,color)怎么样......虽然没有尝试过。
" jcrouse" < ME>在消息中写道
新闻:%2 **************** @ TK2MSFTNGP10.phx.gbl ...
How about CType(colorString,color) ... haven''t tried this though.
"jcrouse" <me> wrote in message
news:%2****************@TK2MSFTNGP10.phx.gbl...
我'我正在看Color类和typeconverters,但我不理解
typedescriptor参数或他们在msdn帮助中给出的例子。
John
" ; Scott M. < S - *** @ nospam.nospam>在消息中写道
新闻:uW ************** @ TK2MSFTNGP09.phx.gbl ...
I''m looking at the Color class and typeconverters but I dont'' understand the typedescriptor parameter or the example they give in the msdn help.
John
"Scott M." <s-***@nospam.nospam> wrote in message
news:uW**************@TK2MSFTNGP09.phx.gbl...
您是否尝试过转换为颜色类?
" jcrouse" <乔********* @ comcast.net>在消息中写道
新闻:uT ************** @ tk2msftngp13.phx.gbl ...
Have you tried converting to a color in the color class?
"jcrouse" <jo*********@comcast.net> wrote in message
news:uT**************@tk2msftngp13.phx.gbl...
我决定开始一个新线程。我有xml文件格式的输出。它
I decided to start a new thread. I have output in xml file format. It
看起来像这样的
looks
:
< P1JoyUp>
< Top> 326< / Top>
< Left> 54< / Left>
< Height> 23< / Height>
< Width> 100< / Width>
< Visible> True< / Visible>
< ForeColor>颜色[白色]< / ForeColor>
< BackColor>颜色[透明]< / BackColor>
<字体> [字体:名称= Microsoft Sans Serif,尺寸= 8.25,单位= 3,
GdiCharSet = 0,GdiVerticalFont = False]< / Font>
< / P1JoyUp>
我写出来并在使用中阅读一个数据集。现在,当我在
like this:
<P1JoyUp>
<Top>326</Top>
<Left>54</Left>
<Height>23</Height>
<Width>100</Width>
<Visible>True</Visible>
<ForeColor>Color [White]</ForeColor>
<BackColor>Color [Transparent]</BackColor>
<Font>[Font: Name=Microsoft Sans Serif, Size=8.25, Units=3,
GdiCharSet=0, GdiVerticalFont=False]</Font>
</P1JoyUp>
I write it out and read it in using a data set. Now when I read it in
中读取它时,我需要
I need
将forecolor和backcolor字符串转换为
to convert the forecolor and backcolor strings to
system.drawing.something。
system.drawing.something.
我需要寻找答案。
谢谢,
John
WHere do I need to look for an answer.
Thanks,
John