473,382 Members | 1,377 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,382 software developers and data experts.

Installing a font using C#

Hi

I was wondering if anyone knows how to install a system font using C#?
I know it doesn´t do the trick to simply copy the font to the font
directory, it just doesn´t become active.

Any ideas?

/Johan
Nov 16 '05 #1
2 9482
Google: "install fonts"+"windows"+"c#"

--
<%= Clinton Gallagher
A/E/C Consulting, Web Design, e-Commerce Software Development
Wauwatosa, Milwaukee County, Wisconsin USA
NET csgallagher@ REMOVETHISTEXT metromilwaukee.com
URL http://www.metromilwaukee.com/clintongallagher/
"Johan Mårtensson" <jo************@hotmail.com> wrote in message
news:#q**************@TK2MSFTNGP09.phx.gbl...
Hi

I was wondering if anyone knows how to install a system font using C#?
I know it doesn´t do the trick to simply copy the font to the font
directory, it just doesn´t become active.

Any ideas?

/Johan

Nov 16 '05 #2
Hej Johan!

Antar att du är Svensk men jag svarar på Engelska i alla fall...

On Wed, 21 Jul 2004 08:26:25 +0200, Johan Mårtensson wrote:

I was wondering if anyone knows how to install a system font using C#?
I know it doesn´t do the trick to simply copy the font to the font
directory, it just doesn´t become active.


You need to first copy the font file to a directory, e.g. %winddir%\Fonts
and then call the Win32 function AddFontResource()

More info here:
http://msdn.microsoft.com/library/de...ntext_9r51.asp
// Anders
Nov 16 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Dennis Hore | last post by:
I'm trying to install Nick Patavalis' ppgplot package on Mac OS X 10.3 with python 2.3. I first sent this message to Nick, but he said he doesn't have any experience with the Mac platform. ...
0
by: Helen W | last post by:
Hi In my vb.net Installer class, I check the InstalledFontCollection for myFont, if it isn't there I try to install it using the GDI function AddFontResource. I am getting the following error...
1
by: Alireza Haghshenass | last post by:
Dear All, I just wanted to know, how can I register a service using Visual studio setup project. I can create a Setup Project successfully, it installs all the program, but I need a hint on how to...
8
by: Earl Damron | last post by:
Has anyone tried having both the original .NET and .NET 2003 on their workstation at the same time? I now need to build and support apps for two different clients that use different versions so...
1
by: eoinmoon | last post by:
Hi all, New to C# and VS 5 and .NET. I have attempted to write a service via various examples and after several failed attempts to write an installer via the VS 5 wizards,etc I tried to install...
0
by: sumitithakral | last post by:
I m working on a project in which the font (for the text to be animated) will be received from VB6.0 in ActionScript. But to do so, I need to embed the corresponding font in adynamic text field at...
5
by: abhubbart | last post by:
I want change the color on the font to red for the text within the div element. I have the following code. <style type="text/css"> .style2 {color: #000000} </style>
7
by: fahadqureshi | last post by:
I have the following code snippet from a larger program which is working perfectly for making a gui and adding buttons to it: self.B0 = wx.Button(id=wxID_FRAME2B0, label='Choose Cases', ...
0
by: Jajjo | last post by:
This post was taken from another site. It frames my needs exactly, so I pilfered it. And ideas on how to do this? Thank you for your time :)
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.