Products Technologies Demo Docs Blog Support Company

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.

TX Text Control .NET for Windows Forms in a C++ Managed Code Project

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.

Stay in the loop!

Subscribe to the newsletter to receive the latest updates.

Related Posts

ASP.NETDockerLinux

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.…


Windows FormsWPF.NET

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.


Windows FormsList.NET

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…


Fields.NET

How to Use the FieldAdapter Classes to Manipulate ApplicationFields

TX Text Control 15.0 introduced FieldAdapter classes that wrap ApplicationFields such as MergeField, DateField, IfField, and form controls with named properties. Developers create and edit MS…


.NETVideo

TX Text Control Smart-Tags: Connecting the Controls with Ease

Visual Studio Smart-Tags in TX Text Control .NET for Windows Forms 15.0 provide design-time access to ViewMode, Dock, and Text properties. A built-in wizard automatically arranges ButtonBar,…

Share on this blog post on: