I see font... font.. font.. and more fonts...
-
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:
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 )
-
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 )
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