Re: Convert String to COlor

Tech-Archive recommends: Fix windows errors by optimizing your registry

From: Cor Ligthert (notfirstname_at_planet.nl)
Date: 06/12/04


Date: Sat, 12 Jun 2004 09:00:06 +0200

Hi John,

It is possible with that string to extract it using a regex, a split or an
indexof or any combination of that.

However much easier is just to save the components of the font seperatly in
your XML file
(I showed you it the way you did to make it not that difficult explaining it
in a message, although I told that somewhere in a thread of you in this
newsgroup)

blablaFontName = textbox1.font.name.tostring
blablaFondSize = textbox1.font.size.tostring
etc.

Than setting it back is much easier
textbox1.font = new font(blablaFontName, csng(blablaFontSize))

I hope this helps?

Cor



Relevant Pages

  • Re: Regex question
    ... structure of the date you're trying to extract. ... For example, in Regex you can ... pattern that will ensure a valid date within the range allowed by T-SQL ... valid date from a string. ...
    (microsoft.public.dotnet.languages.csharp)
  • RE: regular expression question
    ... I am a newbie to regular expressions and want to extract a number from the ... end of a string within an HTML document. ... A really nice free regex editor is called expresso. ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: Regex question
    ... If you want to pull a valid date from a string, then you have to write a pattern that defines the lexical structure of the date you're trying to extract. ... What you're trying to do is simple by Regex standards, but still requires a lot more specificity than "a digit or a slash". ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: Regex question
    ... valid date from a string. ... Stop using Replace to get rid of the stuff you don't want, ... get and then craft a regex to EXTRACT those parts. ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: Parse a string
    ... > way to do it than getting string from start to IndexOf(" "), parsing to ... I suspect a regex would be best. ...
    (microsoft.public.dotnet.framework)