Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Windows Forms / WinForm Controls / November 2007

Tip: Looking for answers? Try searching our database.

Setting the font for a custom control

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Debbie.Croft@nospamforme.com - 21 Nov 2007 14:07 GMT
What's the best procedure for ensure that your custom control uses a font
that's available to the system? I'm developing a control that displays text
as part of the overall UI. I'd like to create, say, three Tahoma fonts
(12pt, 14pt and 12pt-bold). However, Tahoma may not be installed. Unlikely,
but possible.

If I enumerate the installed fonts, I could run down a list of, say, Tahoma,
Vendana, Arial, looking for a match. But, that still leaves the problem of
not being sure of finding one.

What's the best practice here? Or am I missing some crucial fact, as in
there's a suitable font that's *always* installed, so I can check for Tahoma
and, if that fails, just pick up the "guaranteed" font?
Mr. Arnold - 24 Nov 2007 03:02 GMT
> What's the best procedure for ensure that your custom control uses a font
> that's available to the system? I'm developing a control that displays
[quoted text clipped - 9 lines]
> there's a suitable font that's *always* installed, so I can check for
> Tahoma and, if that fails, just pick up the "guaranteed" font?

Wouldn't that be Microsoft Sans Serif font,  which is the default font for
any control when it's placed on a form?

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.