Products Technologies Demo Docs Blog Support Company

'Change Case' in TX Text Control ActiveX

A desirable feature of a word processing application is to change the case of a word, sentence or entire document. This sample application shows you how to implement the different cases known from Microsoft Word using TX Text Control ActiveX. We are going to implement the following case changes: UPPER CASE (convert all characters to uppercase) lower case (convert all characters to lowercase) Title Case (first letter of each word is made uppercase) tOgGlE cAsE (toggle the text, whereby…

'Change Case' in TX Text Control ActiveX

A desirable feature of a word processing application is to change the case of a word, sentence or entire document.

This sample application shows you how to implement the different cases known from Microsoft Word using TX Text Control ActiveX.

We are going to implement the following case changes:

  • UPPER CASE (convert all characters to uppercase)
  • lower case (convert all characters to lowercase)
  • Title Case (first letter of each word is made uppercase)
  • tOgGlE cAsE (toggle the text, whereby capital letters are made lowercase and lowercase letters are made uppercase)
  • Sentence case. (convert the text, whereby the first character of the sentence is uppercase)

In Visual Basic, the functions

LCase
and
UCase
offer the functionality to change the case of characters.

Please take a look at this sample application (complete with downloadable source code), to see how easily this 'change case' feature can be implemented in TX Text Control.

Stay in the loop!

Subscribe to the newsletter to receive the latest updates.

ActiveX

TX Text Control ActiveX is a royalty-free, fully programmable rich edit control that offers developers a broad range of word processing features in a reusable component. It provides comprehensive text formatting, powerful mail merge features and all word processing key concepts such as table support, images, headers and footers and page sections.

See ActiveX products

Related Posts

ActiveXLinesSample

How to Get the Last Line in TX Text Control ActiveX

I have been asked today how to check, if the cursor is in the last line. Here is the resulting code snippet, which includes the extra check for the last text position in the document: Private…


ActiveXSample

FontItalic on CTRL+i with TX Text Control ActiveX

TX Text Control inserts a tab character when the key combination CTRL+i is used. This short code sample shows you how to trap these keystrokes in order to implement some other behavior, such as…


ActiveXSample

Modifying Styles in TX Text Control ActiveX

TX Text Control .NET for Windows Forms offers extensive classes to modify document styles. The FormattingStyle class is the base class for the two different supported style classes: InlineStyle…


ActiveX.NETSample

Open Documents with an Offset

TX Text Control ActiveX offers an Offset parameter to export a document with a specific file offset position. This offset can be used to save a custom file header that could contain additional…


ActiveXSample

Indents and Numbered Lists

If you use the TX Text Control ActiveX button bar to insert a numbered list, you will get a different result than when you insert a numbered list simply using the ListType property. Why is this?…