473,947 Members | 3,413 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

screen.fonts() returns wrong name?

Dear readers,

I use the following to create a collection of fonts to choose from:

For I = 0 To Screen.FontCoun t - 1 'Zero based!
CurFont.AddItem Screen.Fonts(I)
Next i

Then, later I would isue something like:

Picture3.FontNa me = CurFont

to select the font in that picture.
This has always worked well, but now I have a TTF font named like"Strange LT
88 Condensed",
which gives an invalid propery error when assigned to Picture3.
I noticed that in other programs the name is different: "Strange LT 88 Cn".
But even assigning this direct gives the same error....

Very confusing,
please help,
Jean
Jul 17 '05 #1
2 2200
> Picture3.FontNa me = CurFont

Picture3.Font.N ame = CurFont.Text

Note the "dot" between the words "Font" and "Name". Also, I wouldn't rely on
default properties for your controls. Six months from now, when you go to
modify your code, CurFont will look like a variable name and not a control
property.

Rick - MVP
Jul 17 '05 #2
Dear Rick,

Many thanks, you solved my problem.

Jean.

"Rick Rothstein" <ri************ @NOSPAMcomcast. net> wrote in message
news:gs******** ************@co mcast.com...
Picture3.FontNa me = CurFont
Picture3.Font.N ame = CurFont.Text

Note the "dot" between the words "Font" and "Name". Also, I wouldn't rely

on default properties for your controls. Six months from now, when you go to
modify your code, CurFont will look like a variable name and not a control
property.

Rick - MVP

Jul 17 '05 #3

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

Similar topics

10
9338
by: Stéphane Ninin | last post by:
Hello all, I am writing (on Linux Redhat 9) some script to make graphs using PIL, from a set of points. All is ok, except that there seems to be no font coming with PIL. Where could I fond some ? Also, are there some real examples of use of fonts in PIL ? Documentation says something like:
7
14551
by: Michael Hill | last post by:
I have a perl script that i use to render a html page. In that page i call out a stylesheet. If the user has a 800x600 display the fonts are really too big. Since screen resolution is a function of the client and I have this javascript ot detect the srecc size: function ck_res() { if ( (screen.width != 1024) && (screen.height != 768) ) {
64
4340
by: Dave | last post by:
A friend of mine pointed out the other day that certain elements on my web site are too small. But in most of what I publish, fonts are at default size or smaller, and my images are easy to see. I am viewing at 800x600 right now by the way, because that's what I can comfortably see. Times New Roman default pitch is what - 12px? With people increasing their screen resolutions, is it possible for "default size to ever become too small in...
0
3408
by: LaidBack Bill | last post by:
My application allows the user to select fonts. I fill in a combo box control with the available fonts by looping through all System.Fonts: ' Get all the screen fonts ReDim sFontNameList(Screen.FontCount - 1) For i = 0 To Screen.FontCount - 1 sFontNameList(i) = Screen.Fonts(i) Next i
9
3425
by: Les Juby | last post by:
I understand that there are several ways to effectively control the browser delivery of HTML to make the most effective use of the different screen resolutions today. (And in the foreseeable future...) I have a client with a text based site (displays a lot of labour law) which is being read in a range of resolutions and he wants a rewrite as a long term solution to browser resolution compatibility. My thinking goes........
3
5665
by: Chris | last post by:
I think I placed this in the wrong news group so I'm moving it here. Suggestion to Microsoft make the categories more clear and make better sense. ASP.NET should be its own group, why bury under Framework. And I see others doing the same mis-posting to dotnet.general which appears to be gearded more towards windows applications. What are General and Framework for options under .NET Development! After exhausting my search on the MS...
4
2211
by: TOM | last post by:
I have an application that does not behave too well when the user changes the Display Properties -> Appearance -> FontSize after clicking Display from the Control Panel to "Large Fonts" or "Extra Large Fonts" (WinXP defaults to "Normal").
2
1466
by: Sarah Yarok | last post by:
Has anyone seen this strange behavior? My 97 database accidentally got converted to 2002. When I converted it back, all fonts on screen (and in print) seem to be defaulting to MS sans serif. I say seem because when you look at the font property, it lists the correct font, but displays as the default until I change the size (or name). Then it displays properly. I saw this once before though I can't recall the exact circumstances, but...
10
44115
by: =?Utf-8?B?UmljaA==?= | last post by:
A lot of users at my workplace use different screen resolutions, and I build apps to use 1680 x 1050 pixels res by default. But some users are using 800 x 600, and the apps are too large for their screen. I used to write code in Java a few years ago (2005), and you could stretch a form with the mouse and all the controls and fonts would resize to larger or smaller size. Does .Net framework 3.5 support this kind of functionality? Or -...
0
10162
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
11573
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
11159
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
11346
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
10690
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7429
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
6331
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
4537
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
3542
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.