SunQuest
           Visual Basic Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsProgramming Languages - MoreVisual Basic Programming

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
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  
Old October 31st, 2003, 07:30 AM
rjstephens rjstephens is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Oct 2003
Location: Brisbane, Queensland, Australia
Posts: 54 rjstephens User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 5
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

Reply With Quote
  #2  
Old October 31st, 2003, 10:00 AM
Doug G Doug G is offline
Grumpier Old Moderator
Dev Shed God 12th Plane (10500 - 10999 posts)
 
Join Date: Jun 2003
Posts: 10,715 Doug G User rank is Brigadier General (60000 - 70000 Reputation Level)Doug G User rank is Brigadier General (60000 - 70000 Reputation Level)Doug G User rank is Brigadier General (60000 - 70000 Reputation Level)Doug G User rank is Brigadier General (60000 - 70000 Reputation Level)Doug G User rank is Brigadier General (60000 - 70000 Reputation Level)Doug G User rank is Brigadier General (60000 - 70000 Reputation Level)Doug G User rank is Brigadier General (60000 - 70000 Reputation Level)Doug G User rank is Brigadier General (60000 - 70000 Reputation Level)Doug G User rank is Brigadier General (60000 - 70000 Reputation Level)Doug G User rank is Brigadier General (60000 - 70000 Reputation Level)Doug G User rank is Brigadier General (60000 - 70000 Reputation Level)Doug G User rank is Brigadier General (60000 - 70000 Reputation Level)Doug G User rank is Brigadier General (60000 - 70000 Reputation Level) 
Time spent in forums: 1 Month 21 m 37 sec
Reputation Power: 688
Assign a Flags property to choose printer fonts, screen fonts, or both. Do this before you call ShowFonts.

Reply With Quote
  #3  
Old November 2nd, 2003, 01:58 AM
cleverpig cleverpig is offline
Contributing User
Dev Shed Beginner (1000 - 1499 posts)
 
Join Date: Jul 2003
Posts: 1,152 cleverpig User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 7
Send a message via MSN to cleverpig
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.

Reply With Quote
  #4  
Old November 2nd, 2003, 02:04 AM
rjstephens rjstephens is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Oct 2003
Location: Brisbane, Queensland, Australia
Posts: 54 rjstephens User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 5
Ok thanks. It's working now.

a large portion of my help topics seem to be gone out of vb

Reply With Quote
  #5  
Old November 2nd, 2003, 02:05 AM
rjstephens rjstephens is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Oct 2003
Location: Brisbane, Queensland, Australia
Posts: 54 rjstephens User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 5
Ok thanks. It's working now.

a large portion of y help topics seem to be gone out of vb

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming Languages - MoreVisual Basic Programming > Strange problem with commondiaog control fonts function


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 3 hosted by Hostway