proper-case all-caps

  • Thread starter Thread starter John A Grandy
  • Start date Start date
J

John A Grandy

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 ...
 
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 said:
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'.
 
*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,

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
 
* "Cor said:
That is what the poster wants


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,

Did I said something else, look on what is written, the other choise is what
the poster wants?
This will convert the text to proper case, the OP wanted the text to be
displayed in small caps.

:-)

Cor
 
Back
Top