Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. Visual Basic
  4. I see font... font.. font.. and more fonts...

I see font... font.. font.. and more fonts...

Scheduled Pinned Locked Moved Visual Basic
tutorial
3 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • N Offline
    N Offline
    NANCO
    wrote on last edited by
    #1

    hi everyone, can anybody tell me how to change font settings using fontdialog and a way to save the settings so next time I run the software the settings that I set will automatically take effect. :) and This forum is great.:-D:cool:

    C 1 Reply Last reply
    0
    • N NANCO

      hi everyone, can anybody tell me how to change font settings using fontdialog and a way to save the settings so next time I run the software the settings that I set will automatically take effect. :) and This forum is great.:-D:cool:

      C Offline
      C Offline
      Christian Graus
      wrote on last edited by
      #2

      A font is made up of several things, such as a name, a point size, and flags such as is it bold, is it italic. A Font Dialog will return a font to you, you can then store the settings used to rebuild that font. I'm not sure if a font is serialisable, itself. It could be. A Font Dialog lets you choose a font, it does not cause that font to be used anywhere. So, what you want to do, is write code that assigns this font to whatever controls you wish to use it. Call it when the font is changed, and call it on startup, using the font you rebuild from the settings you saved.

      Christian Graus - Microsoft MVP - C++ Metal Musings - Rex and my new metal blog "I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )

      D 1 Reply Last reply
      0
      • C Christian Graus

        A font is made up of several things, such as a name, a point size, and flags such as is it bold, is it italic. A Font Dialog will return a font to you, you can then store the settings used to rebuild that font. I'm not sure if a font is serialisable, itself. It could be. A Font Dialog lets you choose a font, it does not cause that font to be used anywhere. So, what you want to do, is write code that assigns this font to whatever controls you wish to use it. Call it when the font is changed, and call it on startup, using the font you rebuild from the settings you saved.

        Christian Graus - Microsoft MVP - C++ Metal Musings - Rex and my new metal blog "I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )

        D Offline
        D Offline
        Dave Kreskowiak
        wrote on last edited by
        #3

        Christian Graus wrote:

        I'm not sure if a font is serialisable, itself. It could be.

        Even thought the class is tagged Serializable, it's not do-able using the standard XML Serializer methods. You have to write your own Serialization wrapper to get it to work. There's an example in the "Community Content" section on it on this page[^].

        Dave Kreskowiak Microsoft MVP - Visual Basic

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups