473,394 Members | 1,755 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,394 software developers and data experts.

installing a font by using code

Hi,
i tried to install a font by using code like:

res = CreateScalableFontResource(0, Fontlst.Item(i), Fontlst.Item(i),
String.Empty)
res = AddFontResource(Fontlst.Item(i))

That works fine when the pc does not reboot,
however after a reboot these added fonts disappear.

Is there a way to keep them installed also after a reboot?
There was a doc saying to find the fonts in the registry under the local
machine\microsoft\software\currentversion\fonts, but under xp this key does
not exist.

Thanks for your help.

Willie.
Nov 21 '05 #1
1 1291
Hi,

Here is an example that installs a barcode font and displays a
sample.

www.onteorasoftware.com/downloads/barcode.zip

Ken
------------------------------
"Willie jan" <un*****@unkown.com> wrote in message
news:41***********************@news.euronet.nl...
Hi,
i tried to install a font by using code like:

res = CreateScalableFontResource(0, Fontlst.Item(i), Fontlst.Item(i),
String.Empty)
res = AddFontResource(Fontlst.Item(i))

That works fine when the pc does not reboot,
however after a reboot these added fonts disappear.

Is there a way to keep them installed also after a reboot?
There was a doc saying to find the fonts in the registry under the local
machine\microsoft\software\currentversion\fonts, but under xp this key does
not exist.

Thanks for your help.

Willie.

Nov 21 '05 #2

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

Similar topics

3
by: Barry Anderberg | last post by:
I'm using the .NET Memory Profiler by Sci Tech and I wrote a little test application to verify something odd I observed and it appears that System.Drawing.Font fails to dispose of its FontFamily. ...
4
by: Eric Eggermann | last post by:
Hello all, I'm building an app that lays out and prints flash cards. Now the card might be any size, but when the user is working on the card, I draw the preview isotropically, as large as...
0
by: Martin Streller | last post by:
Hello, The code below represents a simple ownerdrawn, Listview class in C#. Its purpose is to avoid the flicker of the MS ListView. So I can't fall back to their one. Does anybody know why I...
2
by: Johan Mårtensson | last post by:
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...
0
by: VMI | last post by:
How can I install a font through my program? I'm currently using AddFontResource(sPath) and it works as long as I open the Windows\Fonts folder after I execute AddFontResource. If I never open it,...
4
by: Johan | last post by:
Hi How would I go about installing a font file on WinXP? I have tried this and it won't get installed properly, private void installFont() { File.Copy(...
7
by: Adam | last post by:
Im trying to add an httphandler for all *.sgf file extensions. I have developed the handler, 1. installed it into the gac 2. added it to the machine.config: <httpHandlers> <add verb="*"...
11
by: Don | last post by:
QUESTIONS: 1. Has anyone figured out how to successfully install the Office 97 Pro Service Release 2 patch in Vista? 2. Has anyone successfully installed an Office 97 Pro CD (SR2 version) in...
4
by: ganesh | last post by:
I have a piece of C# code using ShellExecute API to install a TrueType font on Windows XP. The font is installed correctly and is visible with programs like WinWord. However, the font file seems to...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
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,...
0
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...
0
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...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

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.