Results 1 to 2 of 2

Thread: How to convert a string to system.drawing.fontfamily

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Feb 2009
    Posts
    82

    How to convert a string to system.drawing.fontfamily

    I'm reading a string from a text file and placing it in a variable called "myString"
    Now, I want to take this string and make it the font name of a label, but I'm having a problem converting this string to System.Drawing.FontFamily.

    I've tried this, but it doesn't work
    .NET Code:
    1. CType(myString, System.Drawing.FontFamily)

    What do I do?

  2. #2
    eXtreme Programmer .paul.'s Avatar
    Join Date
    May 2007
    Location
    Chelmsford UK
    Posts
    26,423

    Re: How to convert a string to system.drawing.fontfamily

    try this:

    vb Code:
    1. Dim ff As New FontFamily("Arial")

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width