473,795 Members | 3,393 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 3896
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******** ******@tk2msftn gp13.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
6268
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
1653
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') for line in fp: textWidget.insert(END, "%s" % (line)) The result is that the columns are not really proper if the file-size of the
2
3685
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 be able to make a DSN-Less connection so that my software is not dependent on having ODBC set-up with proper drivers and information. I have done hours of searching/testing but have been unsuccessful at making a DSN-Less connection. Could...
4
2474
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 themselves, or should i return a code to main and handle the error there? If i don't return them to main, except for the structure, what use is the main function except for calling functions?
0
1378
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 font, in my example i bind parent font and i use Api function GetCharWidth to get characters width, this function working fine for mfc however values returning for C# control looks bigger than actual character pixel width for that control, the...
4
1751
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 created a solution that has my four web apps contained in their own projects (correct me if that's not the proper way, but that's an easy way to manage webapps in JBuilder), and I was hoping I could create another project (?) to copy the files over...
48
2259
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 for input a string in an array of char that's dynamically allocated. I mean, I wish not to see any such things as char mystring; I don't want to see any number (if possible) I just want to declare something like char *mystring; and then I don't...
6
1387
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. If Session("userID") is not set, trying to access any other page results in a response.redirect to the default.aspx - this I find to be a simple and useful way of handing user access. My collegue finds this improper use of Session. "What if...
0
9672
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
9519
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10437
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
9042
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
7538
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
5437
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5563
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4113
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
3
2920
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.