|
|
Title | Convert text to proper case using StrConv |
Description | This example shows how to convert text to proper case using StrConv in Visual Basic 6. |
Keywords | StrConv, proper case |
Categories | Strings |
|
|
This program uses the StrConv function to convert text into proper case.
|
|
Private Sub CmdConvert_Click()
OutLabel.Caption = StrConv(InText.Text, vbProperCase)
End Sub
|
|
Note that StrConv is not very smart. It basically converts the first letter in a block separated by spaces into upper case. For example, it converts "pat o'connor" into "Pat O'connor." For smarter programs, look at these examples:
|
|
|
|
|
|