CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3
  1. #1
    Join Date
    Feb 2000
    Location
    london
    Posts
    16

    always same font displayed regardless of choice

    I am writing a program (VB 5) which uses the common dialog box .ShowFont.
    However no matter which font I choose, the font displayed is always Times New Roman, even if I only change the size or bold.
    Using .flag for both.
    What is happening?

    Please Spend a minute to help me with this one.
    Regards
    Ivan


  2. #2
    Join Date
    May 1999
    Posts
    3,332

    Re: always same font displayed regardless of choice

    after displaying the font selection dialog you have to set the font properties of the relevant controls:

    c.Flags = cdlCFScalableOnly Or cdlCFANSIOnly Or cdlCFNoFaceSel Or cdlCFNoVectorFonts Or cdlCFScreenFonts
    c.ShowFont
    Label1.Font.Bold = c.FontBold




    only by Label1.Font.Bold = c.FontBold will the chosen font properties be assigned to the font properties of the control of your choice.


  3. #3
    Guest

    Re: always same font displayed regardless of choice

    Sorry if I didn't make myself clear, but size and bold work fine, it is only the fontname that seems to accept Times New Roman only.

    Thank you again for your time.
    ivan


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

Featured