Results 1 to 7 of 7

Thread: Font control?

  1. #1
    Guest

    Question

    does vb offer a ready form, control, or whatever for selecting a font name, the font's color etc, so we can type with this font in a richtextbox and have the ability to change the font's characteristics ate any time desired?

    (I speak about a control like the one we have in vb in order to set the fonts for example for a richtextbox).

    I hope my question is clear

    Thanks....

  2. #2
    Frenzied Member Jop's Avatar
    Join Date
    Mar 2000
    Location
    Amsterdam, the Netherlands
    Posts
    1,986
    Check out the Microsoft Common Dialog Control,
    it has a .ShowFont method which will fire up the "Select Font"
    and let you select a font.
    Jop - validweb.nl

    Alcohol doesn't solve any problems, but then again, neither does milk.

  3. #3
    Guest

    Unhappy ???

    MainWindow.cdbOpenSave.ShowFont

    I tried that.... It seems right, but when I run it I get a message "there are no fonts installed" and then I get a runtime error "No fonts exist"

    any ideas?

  4. #4
    Frenzied Member Jop's Avatar
    Join Date
    Mar 2000
    Location
    Amsterdam, the Netherlands
    Posts
    1,986
    whow that sucks

    I'm sorry man, can't think of a solution yet ;(
    Jop - validweb.nl

    Alcohol doesn't solve any problems, but then again, neither does milk.

  5. #5
    Guest

    Exclamation Flags

    I found that we must put some flags before.... I will try to do this....


    "Before you use the ShowFont method, you must set the Flags property of the CommonDialog control to one of three constants or values: cdlCFBoth or &H3, cdlCFPrinterFonts or &H2, or cdlCFScreenFonts or &H1. If you don't set Flags, a message box is displayed advising you that "There are no fonts installed," and a run-time error occurs."


  6. #6
    Guest

    Smile OK

    Ok, I managed to do it

    MainWindow.cdbOpenSave.FLAGS = cdlCFBoth
    MainWindow.cdbOpenSave.ShowFont

    Thanks for the help

  7. #7
    Frenzied Member Jop's Avatar
    Join Date
    Mar 2000
    Location
    Amsterdam, the Netherlands
    Posts
    1,986
    hehe allrighty then

    Have a nice christmas mate
    Jop - validweb.nl

    Alcohol doesn't solve any problems, but then again, neither does milk.

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