TX Text Control .NET for Windows Forms in a C++ Managed Code Project
C++ projects in Visual Studio 2003 lack full support for .NET component licensing, causing license exceptions when using TX Text Control .NET for Windows Forms. This guide walks through generating a .licenses file with the lc tool and embedding it in the executable manifest.

If you try to use TX Text Control .NET for Windows Forms in a C++ managed Windows Forms project, you will get a license exception. C++ in Visual Studio 2003 does not provide as much support for the .NET component licensing process as C# or VB.NET. In fact, the licenses file for a licensed control and binding it to the executable is not supported. You have to do this yourself. Below are the steps you should take:
1. Open a Visual Studio 2003 command prompt
2. Change directory to your project folder (licenses.licx must be in this folder)
3. Run the following command to generate the licenses file:
lc /target:[your exe filename.exe] /complist:licenses.licx /i:[your TX Text Control installation folder]\TXTextControl.dll
4. This generates a file called .licenses in the project folder
5. In Visual Studio, right click on the project in the Solution Explorer and select Properties > Linker > Input > Embed Managed Resource File and enter the filename of the .licenses file.
When you rebuild the solution the .licenses file will be embedded in the .exe manifest and the component should be able to read it at runtime.
Related Posts
Create 100,000 Documents in Under an Hour with Parallel MailMerge in .NET C#
The DocumentServer.ParallelMailMerge NuGet package makes it simple to process MailMerge jobs in parallel worker processes. This article shows when to use it, how to call it, and how worker counts…
Speed Up Document Generation by Factor 2 Using Selection Objects in .NET C#
This article compares two ServerTextControl document generation patterns: Assigning prebuilt Selection objects and formatting text after inserting and selecting it. The benchmark shows an…
Getting Started: ServerTextControl and MailMerge in a .NET 8 Console…
This article shows how to create a .NET 8 console application on Linux using Docker and WSL that uses the ServerTextControl to create a document and MailMerge to merge JSON data into the document.…
Create a Table of Contents in Windows Forms using C#
This article explains how to create a table of contents in Windows Forms using the ribbon or programmatically. Creating a table of contents is required to organize large documents.
Two Ways to Restart Numbered Lists in TX Text Control
In TX Text Control, numbered lists are continued by default and need to be reset when required. There is more than one way if you want to restart numbered lists in a document. In this article, two…
