Using UI Toolkit with .NET

You can use UI Toolkit code with the Microsoft .NET Framework in three ways:

Building and running a UI Toolkit application as a cell-based Synergy .NET application

In .NET, most Toolkit routines and Script commands are available, though they result in applications with cell-based rather than Windows-like appearance and functionality. For example, the mouse won’t work in most instances. Note the following:

The following is a summary of the process you’ll follow to use Toolkit code with .NET. See Debugging Synergy Programs.

1. Create a Synergy project in Visual Studio.
2. Add a reference to Synergex.SynergyDE.tklib in your project. For .NET Framework projects, this is a .dll installed in a CLR directory under Program Files\Common Files\Synergex. For .NET 6 and higher, you should add a reference to the Synergex.SynergyDE.tklib NuGet package.
3. Use supported Synergy DBL and Toolkit routines to create the program. You can also define your Toolkit windows in windows script files and then compile the script files with Proto or Script. (See step 1 through step 3 of Getting started with UI Toolkit.) Script and Proto run only in traditional Synergy, but the libraries they create are compatible with Toolkit applications for .NET.
4. Build your application in Visual Studio. This creates an .exe or a .dll assembly.

Restrictions for global fields

When using Toolkit code with .NET, there are some limitations to the ways you can use global fields defined in tools.def and tkctl.def. The following are not supported:

g_select=1
if(g_select)...
clear ^i(temp_var)
g_entnam=temp_var