473,749 Members | 2,665 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 9494
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******** ******@TK2MSFTN GP09.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
2914
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. after installing using python setup.py install (using Numeric; no error messages), and then in python trying >>> import ppgplot i get:
0
1408
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 and don't know why: "System.EntryPointNotFoundException: Unable to find an entry point named AddFontResource in DLL gdi32.dll"
1
2951
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 run "InstallUtil.exe <ApplicationDirectory>\ApplicationName.exe" in order to install and register the service. And of course how can I unRegister the Service when uninstalling the application. I look forward to hearing from you. Alireza...
8
1147
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 I'm wondering if I can use the same workstation to build, test, and support apps for both clients. Thanks Earl
1
4932
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 the service manually using Installutil.exe utility. Unfortunately I am getting an error very early on, during the Installation phase which has left me totally stumped as I don't know how to go about fixing this.
0
1152
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 design time. How can I set font for the text to be animated?
5
3157
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
6803
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', name='B0', parent=self, pos=wx.Point(300, 50), size=wx.Size(400, 50),style=0) self.B0.Bind(wx.EVT_BUTTON, self.OnB0Button, id=wxID_FRAME2B0) I have no problems setting up the buttons but am now trying to add a larger font size...
0
1213
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 :)
0
8997
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9568
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9389
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
9335
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8257
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6801
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4881
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3320
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
2794
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.