Clarion AnyScreen

AnyScreen is our next generation product for deploying Clarion a application as a web/mobile app. With the addition of AnyScreen your existing Clarion application immediately becomes available on Windows, Mac OS, Linux, iOS, and Android. In other words, it allows your Clarion application to run on any Workstation, Notebook, Tablet or Mobile device.

AnyScreen accomplishes this without you making any changes to your apps (except adding the global template to all the .APPs that make up your application). You also don’t need to know any JavaScript or CSS. It is worth mentioning that AnyScreen ships with several CSS “Themes”, such as; Clarion theme (mirrors the Windows UI), Material UI (Android look-alike), Bootstrap, and Bootstrap ‘outline’. All of these can be tweaked and customized. You also get the built-in support to create totally new CSS themes.

As a developer you don’t need to know JavaScript or CSS, and when you deploy your app using AnyScreen for web/mobile, the end-users of your application won’t need any retraining, because although your application is now running in a Browser, your app UI is replicated exactly like they were running it on their desktop. AnyScreen brings you multi-window support within the Browser. So end-users can open multiple Browses, Forms, Reports, Processes, and any other Windows, and switch between them with a mouse click or a touch to the screen — exactly as they would on their desktop. Here is a screenshot showing what I’m describing:

an AnyScreen app running on Firefox with multiple active windows

For Reports, AnyScreen automatically redirects output to a PDF, and opens the report in a new Browser tab where it can be viewed, saved or printed.

Menus get transformed into a web/mobile friendly React menu with some free extra features to expand or contract all, plus a search function, like these:

AnyScreen is the result of a collaboration between SoftVelocity and Ris – the makers of the thin@ product. Our goals for the project were to develop a system that allows Clarion apps to run as web/mobile apps on any device that can run a modern web Browser, without any changes to the app needed, without requiring any knowledge of JavaScript or HTML5/CSS, retaining all the functionality of the desktop app, and importantly – to run as fast as the desktop application.

The underlying technology in the AnyScreen Server has been in production, supporting hundreds of simultaneous users for several years. The new HTML5 client has been used in a production app, supporting more than 100 users for several months. This is proven tech that has been field-tested in a production application and has delivered great results in performance and stability.

If you want to test your application with AnyScreen follow these steps:

  • Register the AnyScreen.tpl (if you installed C11.13505 into a new folder the template should be already registered. If you installed into an existing Clarion folder then you need to register it)
  • open your APP and add the AnyScreen Global Extension. Do this for all the APPs that are part of your application.
  • Use the Applications Pad to Generate and Make all applications – “Generate and Build All” menu option
  • click the “Run with AnyScreen HTML5” toolbar button
Toolbar button to run in default Browser

You can access the AnyScreen documentation from the AnyScreen drop menu:

AnyScreen Key Features

  • Cross-platform HTML5 architecture that works in all modern browsers
  • Very stable working environment
  • Runs as fast as a desktop application
  • Runs on Windows, Linux, Mac, iOS and Android
  • Identical user interface as in your original application including pictures, icons, menus and all Clarion control types
  • Support for complex ActiveX components (WindowsAPI client only)
  • Support for a number of popular Clarion 3rd party products
  • Multi-threaded application support (allows a multi-window environment inside the web browser)
  • Auto-reconnect option – if you lose your internet connection, or something happens with your network, the client will automatically try to reconnect, and as soon as the network is back you can continue your work without any additional actions.
  • Balanced application load on multiple servers
  • Option to support SaaS (Software as a Service) maturity level 4 support: usage-based billing calculation algorithms integrated into the server allowing you to charge by usage time
  • Add the AnyScreen template to all your .app’s, recompile, and you’re ready to deploy
  • No JavaScript knowledge required
  • Scalable: one server can support ~175+ users (depending on the size of your application)
  • Hand-coded programs require only 2 lines of code to be deployed as a web application

When you decide to put your application on to a production server head over to our shop site and start your subscription!

Here’s some information on the AnyScreen clients.

AnyScreen client options

There are three client options: the new HTML5 client (highly recommended), the WinAPI client, and the Java client.

AnyScreen HTML5 Client

The AnyScreen HTML5 client is written in JavaScript. It makes a Clarion application available to run within any modern web browser on the most common platforms; Windows, Linux, Mac, Android and iOS.

Under the covers AnyScreen uses the ReactJS library to render the applications User Interface (ReactJS is a very popular open source project sponsored by Facebook). And ReactJS + HTML5 makes your application available to run on any system with a modern web browser. The AnyScreen HTML5 Client can also be run as an PWA (Progressive Web Application).

AnyScreen HTML5 is the recommended client to deploy your applications, and is the focus for our future development.

AnyScreen WinApi Client

The AnyScreen WinApi Client is written in Clarion and uses the Windows API to draw the user interface. The AnyScreen WinApi client of course only runs on the Windows platform.

The WinApi client code is open-source. That means any Clarion programmer can modify and recompile the client to suit their own unique needs. For example, you could write interfaces to external devices (scanners, plotters etc.), add custom support for 3rd party products etc.

AnyScreen Java Client

The AnyScreen Java Client is written in Java SE. It makes Clarion applications available inside (and outside) a web browser and on various platforms, including Windows, Linux and Mac.

It uses the Java SE Swing library to render the application User Interface. It can run on any hardware that supports the Java Virtual Machine (JVM). The AnyScreen Java Client can be run in three distinct ways:

  1. Run as a standalone desktop application
  2. as a Java Applet in a web browser
  3. or as a standalone application that is accessible through a web browser using JavaWebStart

***** The AnyScreen HTML5 client requires the latest C11 RTL, the minimum RTL build is version 11.13505

CIDC News: Upcoming releases and announcements

The Clarion conference in Orlando was filled with really good content and great speakers. This post is to report (summarize) some of the most relevant points I made in my presentation(s).

I started off with the most important news that the Clarion dev community is most interested in; the release schedule!

The image pretty much says it all, in short, we have an upcoming update for C11.1 which will be available in a couple of weeks. Related to the C11 update is the long awaited release of the AnyScreen resizer (the AS resizer needs a few changes that are included in the C11 update).

Here’s the projected timeline

I announced that we’re launching an open source project, the “Clarion Database Driver Kit”. This project provides the scaffolding and documentation for you to build your own fully Clarion-compliant driver.
Bruce J. of Capesoft already has a list of ideas that he intends to explore. I’ll post back when the project is available on GitHub.

Clarion 12 will release in December. I’ve talked and written a lot about the changes in C12, some are visual but most are internal. But something newly announced (and important) is the implementation of a pathway to making use of AI models (both local on-premises and cloud services). I put this screen up at the conference:

and this one:

No matter where you fall on the GenerativeAI spectrum, the use cases for database application developers are numerous. I’ll have to do a separate post to do justice to this topic.

Another important announcement was this:

We’ve started the process of putting the faithful TopSpeed C/C++ and Modula compilers into semi-retirement, and this image highlights some of the reasoning and benefits:

And just to be clear because I did get some questions on this topic, this change to the tech stack is for use internally in building the RTL and drivers, the [TopSpeed] Clarion compiler lives on!

Wrapping up this post, I made the point that there won’t be a Clarion 13. I’m not at all superstitious, but we’re still changing our version numbering to reflect the year of the release. So Clarion 2024 [64bit] is the release after C12, and it’ll be released by December 2024.

Clarion DevCon 2023

We’re all looking forward to the upcoming Clarion developers conference, where we’ll be presenting the improvements in Clarion 12, along with some exciting brand new recently implemented features. The conference is your opportunity to learn and understand the latest new functionality in Clarion, from some of the brightest developers across the globe.

The Clarion International Developer Conference (CIDC) 2023 is being held on September 11th to September 15th (Sept 11-12 are 2 days of optional training), followed by 3 days of Conference presentations (Sept 13-15). It’s being hosted at the Wyndham Hotel, Disney Springs, Orlando, Florida, USA.

                       – Find out more and register to attend, or submit a request to be a presenter here


CIDC 2022

The latest Clarion developer conference was hosted in Capetown, South Africa. From all accounts it was an excellent event! I was scheduled to do a remote presentation covering some of the future Clarion features. Unfortunately due to technical issues and scheduling problems I wasn’t able do the remote presentation. This post tries to capture and describe the key points of what was planned as a live remote presentation. I’ll be discussing this on ClarionLive on October 28th, 2022.

The key point is that the majority of new code in C12 is internal to the Runtime and the compiler, these are very important advances for the Clarion community.

The next area of development focus is on improvements for the End User Interface (the UI you present to your customers).

example of a few Listbox styles

Here we have a typical Listbox (with the arrow pointing to it), and the other three images are the same Listbox with additional standard Window Styles applied to them.

Setting additional Styles would be handled at runtime before the Window is displayed via a function call or a PROP call. We plan to have a global template where you set the Styles for any supported control by control-type, the Style settings cascade to a Procedure level template so that all affected control-types can share same style (with the ability to override at the Procedure level). Of course you can also use the function/PROP in hand-code or an appropriate Embed point.

These are the same Styles applied as they appear on Windows 11. I’m only showing the Listbox control, but every control supports standard styles beyond the styles applied by the Clarion runtime. It is a simple, yet impactful way for you to change the UI of your app and potentially enhance it.

Additional ‘Common’ controls:

As we work toward adding support for additional controls the plan is to release them incrementally after the GA release of C12.

Here’s a rough timeline/history of the Microsoft UI for Windows developers:

After a deep dive into the .Net world, Microsoft has seemingly circled back to updating the Win API. The Windows App SDK targets both C++ developers and .Net developers.

Desktop apps can be enhanced with mobile and cross platform solutions, but desktop apps continue on as a critical aspect for most businesses.

Clarion 11.1 updated and AnyScreen 2.0 released

We have an update for Clarion 11.1 and a new version of AnyScreen (v2.0). This build fixes an elusive bug in the MS Sql driver, and well as other fixes. A new feature introduced in this build is a new Pragma “eol_is_space”, here’s an excerpt from the Help file that describes it:

PRAGMA (‘option(eol_is_space => on | off)’) W

If the pragma is ON, end-of-line characters inside a string literal are treated as whitespaces allowing string literals to be multi-line. This option is useful for embedding non-Clarion code, such as Javascript, HTML, and SQL scripts.

There are three requirements, (1) the last line of the assignment statement (the closing single quote) must be terminated with a semi-colon, and (2) you cannot have a WINDOW,REPORT,FILE or VIEW defined within the source code where the pragma is ON, (3) the embedded string literal has a maximum length of 64K.

Compiler Error: if the string literal is longer than 64K the compiler posts the error:
“Invalid string (misused <…> or {…}, or literal is too long)”


  PRAGMA ('option(eol_is_space => on)')
  V = '
        <div ng-controller="ExampleController" class="expressions">
          <input type="text" ng-model="expr" size="80"/>
          <button ng-click="addExp(expr)">Evaluate</button>
           <li ng-repeat="expr in exprs track by $index">
             [ <a href="" ng-click="removeExp($index)">X</a> ]
             <code>{{expr}}</code> => <span ng-bind="$parent.$eval(expr)"></span>

       ';  !terminate with semi-colon
  PRAGMA ('option(eol_is_space => off)')

The use of this new pragma allows for some very useful functionality in AnyScreen 2.0. Essentially you can now embed blocks of HTML and Javascript using copy/paste with no restrictions on special characters used with the pragma block.

The install includes a new example that shows how to embed an HTML editor, Code editor, Video player, Google Maps, Signature capture and the Canvas object.

Load up the example app from Clarion\accessory\examples\AnyScreenDemo\ and you can see it in action. Here’s a screen shot:

You can review the complete list of changes for Clarion11.1 here

You can review the complete list of changes for AnyScreen 2.0 here

Clarion 11.1 and AnyScreen 1.2 are released today

Latest update to Clarion is going out today, along with a major update for AnyScreen. There are some key features in the RTL for this release :

We back ported the event handling code from C12 into C11. The purpose is to avoid inter-thread SendMessage API calls. SendMessage can be dangerous in a multi-threaded environment because it isn’t thread-safe, and can result in deadlocks, but its needed for communication between threads.

We added a new public interface for working with Reports. When you implement the new IRpt interface the methods are automatically called by the RTL. You can read about it in the 11.1 Help file, just type “IRpt” into the index.

C11.1 has implemented much lower level support for AnyScreen. This has allowed for expanded functionality in AnyScreen, and faster performance.

Due to compiler changes, and renumbering of some property values, the 11.1 release requires all program components be rebuilt. If you use any 3rd party tools that ship blackbox binary files you’ll want to get the latest update for those tools.

You can read the complete list of changes/fixes and features here

AnyScreen has had a major update. Not only does it provide a large number of fixes, it implements a large number of community requests for added functionality. A lot of hard work went into this release, and a lot of deep testing from a great group of volunteers.

You can read the complete list of changes/fixes and features in AnyScreen here

Thanks to everyone who helped with testing this release!

New application security features in Clarion

We’ve added two new linker options that can make your applications more secure from malware exploits; ASLR (Address space layout randomization) and DEP (Data Execution Prevention).

ASLR (Address space layout randomization)

ASLR also often referred to as DYNAMICBASE, modifies the header of an executable to indicate whether the application should be randomly rebased at load time by the OS.
ASLR is transparent to your application. With ASLR, the only difference is the OS will rebase the executable unconditionally, instead of doing it only when a base image conflict exists. ASLR is supported only on Windows Vista and later operating systems, it is ignored on older OS versions.

Why should you use ASLR? On platforms without ASLR support (versions of Windows prior to Windows Vista), there is a well know exploit approach for an attacker to find and manipulate code that exists within its modules (DLLs and EXEs) when the modules have been loaded at predictable locations in the address space of the process. Address space layout randomization (ASLR) randomizes the memory locations used by programs, making it much harder for an attacker to correctly guess the location of a given process, including the base of the executable and the positions of the stack, heap and libraries.

In the next build of C11, the “Dynamic Base Address” option is set on by default at the project level.

If you want to set it from the EXP file, the command is:

on any line by itself (outside of the Exports)

DEP (Data Execution Prevention)

The purpose of DEP is to prevent attackers from being able to execute data as if it were code. This stops an attack that tries to execute code from the stack, heap, and other non-code memory areas. DEP prevents malware from writing code into data pages then executing it.

In the next build of C11, the “Data Execution Protection” option is set on by default at the project level.

If you want to set it from the EXP file, the command is:

on any line by itself (outside of the Exports)


The combined use of DEP (Data Execution Prevention) and ASLR (Address Space Layout Randomization) have proven to be effective against the types of exploits that are in use today. DEP breaks exploitation techniques that attackers have traditionally relied upon, but DEP without ASLR is not sufficient to prevent arbitrary code execution in most cases. DEP is also needed to make ASLR (Address Space Layout Randomization) more effective.

Adding these two malware countermeasures to your applications is especially useful for applications that handle financial data, credit cards, health info, and more.

To set these linker options in Clarion at the Project level:

Open the Project properties page:


then click on the “Compiling” tab and set the checkboxes to ON


New Clarion language features

Some exciting new features in the Clarion language will be introduced in the next build for C11: Reference variables of Procedure types are supported by the compiler, and corresponding support is added to the linker and RTL.

Declaration of a Procedure reference

A reference variable of a procedural type is declared as follows:

Ref &<procedure label>

where <procedure label> is the label of a previously declared Procedure, a parameter of procedural type, or the label of a method in a CLASS or INTERFACE. If there is more than one Procedure or Class/Interface method with the label (for example, a class method is overloaded), or there is a data declaration with the same label in the current scope/context, the compiler returns an error.

A previous MAP structure must contain the corresponding Procedure type declaration to allow references to a Class or Interface method:

    MethodNameType  PROCEDURE (*ClassId, <other parameters>),...,TYPE       

Ref   &MethodNameType

We’re also considering a possible extension in the future is to allow the <procedure label> to include the Class or Interface identifier as part of the declaration, for example:
Ref &ClassId.MethodName

2. Procedure Reference assignments

The reference assignment to a reference variable of procedural type has the same form as for any other reference assignment:

RefVar &= <source>

For reference assignments to reference variables of procedural types the right-hand side can be any one of the following:

2) an expression where the value can be converted to a LONG type
3) the label of a reference variable of procedural type
4) the label of a parameter of procedural type
5) the label of a Procedure declared in a MAP structure
6) the label of a Class method

For (3),(4) and (5) the profile of a Procedure, or a procedural type on the right hand side must be exactly the same as the profile of the procedural type used in the declaration of the reference variable on the left hand side:

meaning it must match the number of, the types of parameters, the return type, and the calling convention. (or both sides can have no return type)

For (6) if the method label on the right side is overloaded, the compiler tries to find the method with the most suitable profile. In this case “suitable” means that the first parameter (class type) on the right side can also be of a type which is a descendant
of the class type of the first parameter in the profile of the reference variable’s type. All other parameters, their order, return type, and the calling convention must be exactly the same.

The identifier on the right side can include:

  • the label of an instance of a class type, or the label of an interface
  • the label of a reference variable assigned to a class type
  • the label of a reference variable assigned to an interface type
  • the SELF or PARENT keywords
  • the label of a Class type

For example:



R1       &PType
R2       &MESSAGE  ! the MESSAGE - built-in function
RC       &CType
AClass   CType


  RC &= AClass
  R1 &= NULL
  R1 &= AClass.M
  R1 &= RC.M
  R1 &= CType.M
  R2 &= 0 + SYSTEM {PROP:MessageHook}

3. Reference equality operator

The reference equality operator for the reference variable of a procedural type has the same form as for any other reference variables:

Ref &= <right side>

If the left side of the reference equality operator is a reference variable of procedural type,
the <right side> can be of any form as the <source> described above in the “Procedure Reference Assignments” section.

There is one exception for this: if the <right side> is a label of a Class/Interface method, and this label is overloaded, the compiler reports an error; “Error: Ambiguous reference type“, rather than trying to choose the intended matching variation of the method.

4. Usage

A Reference variable of a procedural type can be used in any context where procedures/functions with the same profiles are valid:

  • call statements
  • a parameter of a procedural type
  • the Sort function parameter in QUEUE statements ADD, GET, PUT and SORT
  • as a parameter of the ADDRESS function
  • as a parameter of the BIND statement

Probably the most typical variations of usage for procedural type references are:

  • Calling DLL functions from addresses returned by the Windows API’s GetProcAddress function
  • SYSTEM hooks properties are no longer write-only in the upcoming RTL release. The result of getting these properties are RTL internal functions implementing corresponding statements:
    MESSAGE, COLORDIALOG, FONTDIALOG and other standard dialogs,
    OPEN for Windows and Reports, CLOSE for Windows and Reports, changing SYSTEM properties, etc.

    This means your program can retrieve the RTL’s hook function and replace it with your own function, which calls the original RTL code internally
  • Simulation of virtual functions in cases where the actual function can be changed at run time.

5. Some General info

  • Reference variables of procedural type can be declared as a field in GROUP/QUEUE/CLASS declarations
  • The DIM attribute is currently invalid for declarations of reference variables, and that same rule applies for reference variables of procedural types.
  • The ADDRESS function supports Class type labels in the identifiers of methods passed as parameters, for example, using the declarations from the example above the following expression:

    ADDRESS (CType.M)

    is valid in the upcoming release.

The new language enhancements can be likened to a pointer-to-method, and reference-to-method in C++. But in C++ a special syntax is used to allow the compiler and linker to handle these language constructs properly. No special syntax is required in Clarion.

TYPEd Class Methods

Another powerful language enhancement available in the upcoming release is support for TYPEd Class methods. I’ll be making a separate post on typed Class methods with an example of usage.