473,406 Members | 2,707 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,406 software developers and data experts.

proper-case all-caps

does anyone know of an intrinsic .NET function , or font , or other
mechanism , to do "proper-case all-caps" ... ?

so, for a name like "Arnold Schwarzenegger" ...

.... I want it entirely in capital letters , "ARNOLD SCHWARZENEGGER",
*except* that the "A" and the "S" should be a slightly larger font-size than
the rest of the letters ...
Nov 20 '05 #1
7 3878
What you need is to use "small caps." For example, in Microsoft Word, if
you enter
"Recall Gov. Schwarzenegger" <g> and then set the text to Small Caps (in the
Font dialog box), you'll get the result you want.

The only problem is that, as far as I know, there aren't any text components
that support small caps in the .Net Framework. There also don't appear to
be any third-party components that support it. (I've been looking for years
for a rich text box component with this functionality.)

The best you can do is roll your own. Basically, you need to extend the
RichTextBox with a new property or method that converts lowercase letters to
uppercase letters, but reduces their size a bit (80-90% is about right.)
There are various ways you could do this.

"John A Grandy" <johnagrandy-at-yahoo-dot-com> wrote in message
news:OQ**************@tk2msftngp13.phx.gbl...
does anyone know of an intrinsic .NET function , or font , or other
mechanism , to do "proper-case all-caps" ... ?

so, for a name like "Arnold Schwarzenegger" ...

... I want it entirely in capital letters , "ARNOLD SCHWARZENEGGER",
*except* that the "A" and the "S" should be a slightly larger font-size than the rest of the letters ...

Nov 20 '05 #2
* "John A Grandy" <johnagrandy-at-yahoo-dot-com> scripsit:
does anyone know of an intrinsic .NET function , or font , or other
mechanism , to do "proper-case all-caps" ... ?

so, for a name like "Arnold Schwarzenegger" ...

... I want it entirely in capital letters , "ARNOLD SCHWARZENEGGER",
*except* that the "A" and the "S" should be a slightly larger font-size than
the rest of the letters ...


You will have to set the font size when drawing the text. The lowercase
characters can be converted to uppercase using 'UCase'.

--
Herfried K. Wagner [MVP]
<http://www.mvps.org/dotnet>
Nov 20 '05 #3
On Mon, 17 Nov 2003 16:09:45 -0800, John A Grandy wrote:
*except* that the "A" and the "S" should be a slightly larger font-size than
the rest of the letters ...


Another choice is to use a font that has small caps instead of lower case
letters.
--
Chris

To send me an E-mail, remove the underscores and lunchmeat from my E-Mail
address.
Nov 20 '05 #4
Cor
Chris,

That is what the poster wants

Another choice is to use a font that has small caps instead of lower case
letters.


Otherwise he could use str = StrConv(str, vbProperCase)

Cor
Nov 20 '05 #5
* "Cor" <no*@non.com> scripsit:
That is what the poster wants
Another choice is to use a font that has small caps instead of lower case
letters.


Otherwise he could use str = StrConv(str, vbProperCase)


This will convert the text to proper case, the OP wanted the text to be
displayed in small caps.

:-)

--
Herfried K. Wagner [MVP]
<http://www.mvps.org/dotnet>
Nov 20 '05 #6
Cor
Herfried,

Did I said something else, look on what is written, the other choise is what
the poster wants?
That is what the poster wants
Another choice is to use a font that has small caps instead of lower case letters.


Otherwise he could use str = StrConv(str, vbProperCase)


This will convert the text to proper case, the OP wanted the text to be
displayed in small caps.

:-)


Cor
Nov 20 '05 #7
* "Cor" <no*@non.com> scripsit:
Did I said something else, look on what is written, the other choise is what
the poster wants?


Ah...

--
Herfried K. Wagner [MVP]
<http://www.mvps.org/dotnet>
Nov 20 '05 #8

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

Similar topics

2
by: Bruce W...1 | last post by:
For include files I see both the file extensions .php and .inc used. Which one is proper? Does it matter? What's the diff? Thanks for your help.
0
by: T. Kaufmann | last post by:
Hi there, I have some lines of code in a Tkinter programm - I want to list every single file of a zip-archive in a Text widget: fp = os.popen("%s %s" % ('unzip -vl ', 'anyarchiv.zip', 'r')...
2
by: Kevin | last post by:
I am currently importing data into Access 2002 from 3 Sybase ASA 7.0 databases over a network. At this time I am using a ODBC System DSN connection using the proper ASA 7 driver. I would like to...
4
by: atv | last post by:
Whatis the proper way to handle errors from function calls? For example, i normally have a main function, with calls to mine or c functions. Should i check for errors in the functions called...
0
by: bj | last post by:
hello is there any chance to get proper char width for class derived from user control - im working over text editing control, so i need proper width of every character for currently selected...
4
by: Flip | last post by:
What is the proper/suggested/best way to deploy a webapp to a Win2K3 Server running IIS6? I am coming from the j2ee world (easy on the flames please, I'm moving to ..NET remember :>), and I've...
48
by: Michel Rouzic | last post by:
I know it must sound like a newbie question, but I never really had to bother with that before, and I didn't even find an answer in the c.l.c FAQ I'd like to know what's the really proper way...
6
by: Morten Snedker | last post by:
A user enters a password. Via stored procedure i lookup that (unique) password. If it is found I save the userID to a Session("userID") for later use. I use no other saved variables than this one....
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?
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
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,...
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
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...
0
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...

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.