Hello,
I have a notepad program which saves file in xml format. It saves current color and font along with all features in FontDialog and ColorDialog like underline etc.
Here is the sample of a file i created in the program.
< xml version="1.0" >
<File>
<Format>
<Fontface>Tahoma</Fontface>
<Fontbold>True</Fontbold>
<Fontitalic>False</Fontitalic>
<Fontsize>15.75</Fontsize>
<Fontunderline>True</Fontunderline>
<Fontstrikeout>True</Fontstrikeout>
<Fontcolor>Color [Red]</Fontcolor>
</Format>
<Data>Testing</Data>
</File>
Now as you can the problem is with Color... coz sometimes the ColorDialog gives me Color in RGB format and sometimes like Color[Red] !
Here is what i have used in Streamwriter -
sr.WriteLine(vbTab & vbTab & "<Fontcolor>" & Convert.ToString(TextBox1.ForeColor) & "</Fontcolor>")
Here is what i have used in StreamReader -
Dim forecolor As String = temp.Substring((temp.IndexOf("<Fontcolor>") + 11), (temp.IndexOf("</Fontcolor>") - 11) - (temp.IndexOf("<Fontcolor>")))
Now If we compare this with the above file -
forecolor string shud have this value - Color [Red]
Again i am dazzled as to how i convert a Color in string to a Color
Help me please !

Notepad program wants to write Fonts and Colors in XML.
Sudheer George
Andre&#39;s
Convert.ToString
Don't do this.......... instead
Save it as a value.....and not a string
CharlesF
The next VS version is being worked on using the project name "Orcas". There'll be big changes ahead (WinFX), google the project name.
Ken_Bussell
aarongreenberg
Are you talking about RGB values... how can i convert the ForeColor of a textbox to a RBG value and then read it again from a string or an integer to apply it to the opening document
Can you answer one more query ...
when is the next visual studio gonna launch
what is the best way to prepare yourself for future releases
i am using VS 2005.
Thanks... I like this place.. i wish i cud talk to microsoft technicians i have something to discuss.
MadGerbil
Next version of Visual Studio Crikey.
I think what we have is what we've got for a few years - I can't see a lot of improvements needing to it. Ofcourse .NET Framework 3.0 extends version 2.0, but I'm sure that'll really be just addressed with a VS Service pack.
Oh, And I agree about the XML Thing - Use the XmlReader/Writer - no Excuses