|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
Get inside! Sample the range of functionality easily built with JMSL Library for Time Series Data Analysis, Heat Maps, Portfolio Optimization, Monte Carlo Simulation, Stock Price Charting and more. Download Now! |
|
#1
|
|||
|
|||
|
Strange problem with commondiaog control fonts function
Hi
whenever I use Commondialog1.shwofont, I get a message saying I have no fonts installed and to install some fonts, then when I click ok I get Run-time error 24574 No fonts exist. Does anyone know the cause for this? Thanks, Richard |
|
#2
|
|||
|
|||
|
Assign a Flags property to choose printer fonts, screen fonts, or both. Do this before you call ShowFonts.
|
|
#3
|
|||
|
|||
|
Maybe U have a little fonts on your computer..U set the Flags before u call showfonts??If u don't do it,u can try to do it work:
The Font Dialog box is the one with the most properties, but it is the most useful if you are making a text editor. (Or another app where the user needs to set the font.) ¡°The Font dialog box allows the user to select a font by specifying a font, size, color, and style.¡± ¨C from MSDN. The following code will change the font properties in a rich text box, which we will call RTB1. VB: -------------------------------------------------------------------------------- On Error Resume Next 'allow for errors With CommonDialog1 'open the with dialog .DialogTitle = "Font" 'set the dialog title .Flags = cdlCFBoth Or cdlCFEffects 'set the flags so you can 'access the fonts* and the strikethru, underline, color .ShowFont 'show the dialog End With RTB1.SelFontName = CommonDialog1.FontName 'set the selected font¡¯s name RTB1.SelFontSize = CommonDialog1.FontSize 'set the selected font¡¯s size RTB1.SelBold = CommonDialog1.FontBold 'set the selected font¡¯s bold property RTB1.SelItalic = CommonDialog1.FontItalic 'set the selected font¡¯s italic property RTB1.SelStrikeThru = CommonDialog1.FontStrikethru 'set the selected font¡¯s strikethrough property RTB1.SelUnderline = CommonDialog1.FontUnderline 'set the selected font¡¯s underline property -------------------------------------------------------------------------------- *The flags property for the Font Dialog has many options: cdlCFBoth displays both the Screen's fonts and the Printer's fonts. cdlCFPrinterFonts displays the fonts that the printer uses. cdlCFScreenFonts displays the fonts that the screen has. cdlCFEffects allows you to select underline, strikethrough, and color. cdlCFTTOnly allows you to only display the True Type fonts. |
|
#4
|
|||
|
|||
|
Ok thanks. It's working now.
a large portion of my help topics seem to be gone out of vb ![]() |
|
#5
|
|||
|
|||
|
Ok thanks. It's working now.
a large portion of y help topics seem to be gone out of vb ![]() |
![]() |
| Viewing: Dev Shed Forums > Programming Languages - More > Visual Basic Programming > Strange problem with commondiaog control fonts function |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|