# code

**URL:** https://clarionhub.com/c/code/11.md

[Latest](https://clarionhub.com/latest.md) · [Categories](https://clarionhub.com/categories.md) · [Tags](https://clarionhub.com/tags.md)

---

## [About the Clarion Code category](https://clarionhub.com/t/about-the-clarion-code-category/16)

<div class="topic-metadata">

**Author:** [@brahn](https://clarionhub.com/u/brahn)\
**Replies:** 0

</div>

A place to discuss clarion code, there is also a sub category specifically for code snippets if you have any to share!

---

## [Memory leak with TIMER](https://clarionhub.com/t/memory-leak-with-timer/9190)

<div class="topic-metadata">

**Author:** [@jkay](https://clarionhub.com/u/jkay)\
**Replies:** 40\
**Last updated:** [August 26, 2026, 11:46am UTC](https://clarionhub.com/t/memory-leak-with-timer/9190 "2026-08-26T11:46:18Z")

</div>

I’ve been advised (via the C12 newsgroup) to repost this here… It would be appreciated if someone from SV could look at problem tracker #43507. This will prevent our C12 adoption and it’s very likely other Clarion use…

---

## [An AI agent skill, a cross-platform CLI tool, and a C# class for working with TPS files](https://clarionhub.com/t/an-ai-agent-skill-a-cross-platform-cli-tool-and-a-c-class-for-working-with-tps-files/9250)

<div class="topic-metadata">

**Author:** [@CarlosGtrz](https://clarionhub.com/u/CarlosGtrz)\
**Replies:** 0\
**Last updated:** [July 23, 2026, 10:02pm UTC](https://clarionhub.com/t/an-ai-agent-skill-a-cross-platform-cli-tool-and-a-c-class-for-working-with-tps-files/9250 "2026-07-23T22:02:14Z")

</div>

GitHub - TpsReader. TpsReader for .NET TpsReader is a simple, read-only .NET library for opening TopSpeed (.TPS) files and reading their tables and records. TpsReader.Tool supplies the tps command for schema discovery…

---

## [Curl with Private Key](https://clarionhub.com/t/curl-with-private-key/9195)

<div class="topic-metadata">

**Author:** [@John\_Singer](https://clarionhub.com/u/John_Singer)\
**Replies:** 1\
**Last updated:** [June 27, 2026, 11:39am UTC](https://clarionhub.com/t/curl-with-private-key/9195 "2026-06-27T11:39:41Z")

</div>

I am trying to upload a file to an sftp site using libcurl. Usually I start these kind of things using the command line curl, which I did and it worked. However in translating it back to Clarion, I have been unable to g…

---

## [Critical Section - compile error "Unknown function label' on NewCriticalSection()](https://clarionhub.com/t/critical-section-compile-error-unknown-function-label-on-newcriticalsection/9132)

<div class="topic-metadata">

**Author:** [@greenslk](https://clarionhub.com/u/greenslk)\
**Replies:** 4\
**Last updated:** [May 25, 2026, 8:44pm UTC](https://clarionhub.com/t/critical-section-compile-error-unknown-function-label-on-newcriticalsection/9132 "2026-05-25T20:44:31Z")

</div>

Getting Unknown function label error on SELF.LockQ &= NewCriticalSection() My class clw… MEMBER INCLUDE('nxWorkX.inc'),ONCE INCLUDE('CWSYNCHC.INC'),ONCE MAP INCLUDE('CWUTIL.INC'),ONCE END nxWorkX.Construct …

---

## [Setting SDI window position at runtime above Taskbar](https://clarionhub.com/t/setting-sdi-window-position-at-runtime-above-taskbar/9050)

<div class="topic-metadata">

**Author:** [@greenslk](https://clarionhub.com/u/greenslk)\
**Replies:** 4\
**Last updated:** [April 18, 2026, 8:08pm UTC](https://clarionhub.com/t/setting-sdi-window-position-at-runtime-above-taskbar/9050 "2026-04-18T20:08:01Z")

</div>

Ok slight brain fart… I need to position an SDI window at runtime (center horizontally and above the taskbar) I use the GetPosition(myWindow, x, y, w ,h) but missing how to get the total width/height of the desktop and…

---

## [Need some help with Clarion (6.4) hand code & resource file](https://clarionhub.com/t/need-some-help-with-clarion-6-4-hand-code-resource-file/9016)

<div class="topic-metadata">

**Author:** [@Ville](https://clarionhub.com/u/Ville)\
**Replies:** 4\
**Last updated:** [March 29, 2026, 5:21pm UTC](https://clarionhub.com/t/need-some-help-with-clarion-6-4-hand-code-resource-file/9016 "2026-03-29T17:21:32Z")

</div>

It’s been over 20 years since I last seriously coded with Clarion. Time flies… I’ve been digging out my cw version 6.4 from the dust for a long time now and am excited to try attaching a wav audio file as a resource and…

---

## [Resizer.Init error](https://clarionhub.com/t/resizer-init-error/8930)

<div class="topic-metadata">

**Author:** [@jackp\_MDB](https://clarionhub.com/u/jackp_MDB)\
**Replies:** 2\
**Last updated:** [February 4, 2026, 7:35pm UTC](https://clarionhub.com/t/resizer-init-error/8930 "2026-02-04T19:35:40Z")

</div>

I am working in Clarion v12. Initially when I generated the APP there were no problems. Then I started getting the following error when generating my app: "Expected: ( ; ACCEPT ASSERT CHOOSE END INCLUDE OMIT RAI…

---

## [EasyMultiTag issues with highlight not updating after single click](https://clarionhub.com/t/easymultitag-issues-with-highlight-not-updating-after-single-click/8701)

<div class="topic-metadata">

**Author:** [@Rachel\_Alley](https://clarionhub.com/u/Rachel_Alley)\
**Replies:** 2\
**Last updated:** [January 23, 2026, 1:35pm UTC](https://clarionhub.com/t/easymultitag-issues-with-highlight-not-updating-after-single-click/8701 "2026-01-23T13:35:54Z")

</div>

I’m using the latest Standard Edition EasyMultiTag version 2.10 and I’m having issues with the browse display not updating when I single click with or without control or shift keys pressed, which worked correctly in Easy…

---

## [New examples for gdiplus classes](https://clarionhub.com/t/new-examples-for-gdiplus-classes/6548)

<div class="topic-metadata">

**Author:** [@Mike\_Duglas](https://clarionhub.com/u/Mike_Duglas)\
**Replies:** 4\
**Last updated:** [December 29, 2025, 6:00pm UTC](https://clarionhub.com/t/new-examples-for-gdiplus-classes/6548 "2025-12-29T18:00:58Z")

</div>

New examples for gdiplus classes. Metadata: geolocation metadata (latitude/longitude/altitude) extraction AsciiArt: changing a picture into an ASCII art (see the article “Generate ASCII Art – A Simple How To in C#”)

---

## [TPS TryInsert Access Denied](https://clarionhub.com/t/tps-tryinsert-access-denied/8851)

<div class="topic-metadata">

**Author:** [@greenslk](https://clarionhub.com/u/greenslk)\
**Replies:** 5\
**Last updated:** [December 12, 2025, 4:43pm UTC](https://clarionhub.com/t/tps-tryinsert-access-denied/8851 "2025-12-12T16:43:04Z")

</div>

Using a process template reading an SQLite2 table and writing to TPS (C:\\Users\\Public\\Documents\\myApp\\data\\v3DailyMetrics.tps) fails with Access Denied The open is successful but the TryInsert throws an error |\*\*\* dbSt…

---

## [UPPER() in filter fails](https://clarionhub.com/t/upper-in-filter-fails/8763)

<div class="topic-metadata">

**Author:** [@zenzag](https://clarionhub.com/u/zenzag)\
**Replies:** 8\
**Last updated:** [November 11, 2025, 10:43pm UTC](https://clarionhub.com/t/upper-in-filter-fails/8763 "2025-11-11T22:43:59Z")

</div>

Hello everyone. Clarion11.1 PE Build 13845, legacy templates. I have the following code in a report filter: EMP:DateTerminated \< 1 AND UPPER(EMP:Category) = ‘PAYROLL’ It appears the UPPER() function causes the filter…

---

## [GradientClass and example added to ClarionClasses repo](https://clarionhub.com/t/gradientclass-and-example-added-to-clarionclasses-repo/1155)

<div class="topic-metadata">

**Author:** [@brahn](https://clarionhub.com/u/brahn)\
**Replies:** 4\
**Last updated:** [October 17, 2025, 10:32pm UTC](https://clarionhub.com/t/gradientclass-and-example-added-to-clarionclasses-repo/1155 "2025-10-17T22:32:18Z")

</div>

I have had this class around for ages and in fact stopped using it a while back, opting instead for more minimalist approach to styling, but I noticed the topic popped up again on the newsgroups and in skype chat so figu…

---

## [ClarionFreeImage %FixClassError](https://clarionhub.com/t/clarionfreeimage-fixclasserror/8673)

<div class="topic-metadata">

**Author:** [@KenShauvin](https://clarionhub.com/u/KenShauvin)\
**Replies:** 0\
**Last updated:** [October 7, 2025, 5:16pm UTC](https://clarionhub.com/t/clarionfreeimage-fixclasserror/8673 "2025-10-07T17:16:27Z")

</div>

Anyone ever encounter this error? I have an app that uses ClarionFreeImage and I keep getting this error when I compile it: TPL: (PBDY.$$$) Error: ASSERT: %FixClassName: Cannot find class “cfiImageControl”. It has a w…

---

## [A cryptographic version of RANDOM()](https://clarionhub.com/t/a-cryptographic-version-of-random/8300)

<div class="topic-metadata">

**Author:** [@CarlosGtrz](https://clarionhub.com/u/CarlosGtrz)\
**Replies:** 0\
**Last updated:** [June 17, 2025, 5:32am UTC](https://clarionhub.com/t/a-cryptographic-version-of-random/8300 "2025-06-17T05:32:54Z")

</div>

While fixing MakeSGuid I tested BCryptGenRandom and found it’s straightforward to use in Clarion for generating cryptographically secure random numbers. Clarion’s built-in RANDOM function uses a simple pseudo-random alg…

---

## [Another lexicographically sortable unique id generator](https://clarionhub.com/t/another-lexicographically-sortable-unique-id-generator/7503)

<div class="topic-metadata">

**Author:** [@CarlosGtrz](https://clarionhub.com/u/CarlosGtrz)\
**Replies:** 8\
**Last updated:** [June 17, 2025, 12:50pm UTC](https://clarionhub.com/t/another-lexicographically-sortable-unique-id-generator/7503 "2025-06-17T12:50:39Z")

</div>

Using randomly generated unique ids has a lot of advantages over table based autonumbered fields. The most common option is to use UUIDs/GUIDs, which are 128 bits long but commonly stored as a 36 bytes string. Another …

---

## [Incorrect displaying of large numerics](https://clarionhub.com/t/incorrect-displaying-of-large-numerics/8265)

<div class="topic-metadata">

**Author:** [@Rick\_UpperPark](https://clarionhub.com/u/Rick_UpperPark)\
**Replies:** 0\
**Last updated:** [June 6, 2025, 4:10pm UTC](https://clarionhub.com/t/incorrect-displaying-of-large-numerics/8265 "2025-06-06T16:10:02Z")

</div>

General warning that the runtime doesn’t display large numbers correctly depending on the picture. In this example, the entry fields all have the same USE variable that is a decimal 20,2 with a value of has 100553040855…

---

## [Dim Fields in Queue for LIST Box shows 10 : Parameter typing error](https://clarionhub.com/t/dim-fields-in-queue-for-list-box-shows-10-parameter-typing-error/8231)

<div class="topic-metadata">

**Author:** [@AlexBerg](https://clarionhub.com/u/AlexBerg)\
**Replies:** 3\
**Last updated:** [May 29, 2025, 8:50pm UTC](https://clarionhub.com/t/dim-fields-in-queue-for-list-box-shows-10-parameter-typing-error/8231 "2025-05-29T20:50:54Z")

</div>

Trying to show a queue with dim fields in a list box. I get an error as soon as the window opens. TestQueue Queue(),Pre() Name String(20) DimStr String(20),Dim(20) End If I create a window with the Name and DimStr\[…

---

## [RANDOM is broken in C11.1.13815](https://clarionhub.com/t/random-is-broken-in-c11-1-13815/6938)

<div class="topic-metadata">

**Author:** [@Mike\_Duglas](https://clarionhub.com/u/Mike_Duglas)\
**Replies:** 12\
**Last updated:** [May 26, 2025, 5:28pm UTC](https://clarionhub.com/t/random-is-broken-in-c11-1-13815/6938 "2025-05-26T17:28:56Z")

</div>

Simple code that produces a sequence of random numbers: PROGRAM MAP INCLUDE('printf.inc'), ONCE END i LONG, AUTO v LONG, AUTO CODE LOOP i=1 TO 10 …

---

## [What is the minimum .Net Framework I should have installed](https://clarionhub.com/t/what-is-the-minimum-net-framework-i-should-have-installed/8158)

<div class="topic-metadata">

**Author:** [@sgower](https://clarionhub.com/u/sgower)\
**Replies:** 3\
**Last updated:** [May 13, 2025, 7:45pm UTC](https://clarionhub.com/t/what-is-the-minimum-net-framework-i-should-have-installed/8158 "2025-05-13T19:45:35Z")

</div>

What is the minimum .Net Framework I should have installed for my clarion app generated with Clarion 11.1.13845. I use both Noyantis Add ons as well as Capesoft add ons.

---

## [Fetching records with GET( key , val1 , vall2 ...)](https://clarionhub.com/t/fetching-records-with-get-key-val1-vall2/8134)

<div class="topic-metadata">

**Author:** [@CarlosGtrz](https://clarionhub.com/u/CarlosGtrz)\
**Replies:** 11\
**Last updated:** [May 5, 2025, 4:46am UTC](https://clarionhub.com/t/fetching-records-with-get-key-val1-vall2/8134 "2025-05-05T04:46:49Z")

</div>

Hi @BoxSoft Regarding your comment on today’s webinar about a command to fetch records using just a key label and the corresponding values, I wrote exactly that a few years ago as a part of Table Manager (GitHub). The …

---

## [cJSON parser: Clarion port](https://clarionhub.com/t/cjson-parser-clarion-port/2144)

<div class="topic-metadata">

**Author:** [@Mike\_Duglas](https://clarionhub.com/u/Mike_Duglas)\
**Replies:** 11\
**Last updated:** [April 25, 2025, 12:14pm UTC](https://clarionhub.com/t/cjson-parser-clarion-port/2144 "2025-04-25T12:14:13Z")

</div>

cJSON is ultralightweight JSON parser in ANSI C. This repository contains cJSON port to Clarion: The documentation can be found here

---

## [GUID (Microsoft COM UUID Mixed-Endian) constants in Clarion](https://clarionhub.com/t/guid-microsoft-com-uuid-mixed-endian-constants-in-clarion/8093)

<div class="topic-metadata">

**Author:** [@CarlosGtrz](https://clarionhub.com/u/CarlosGtrz)\
**Replies:** 1\
**Last updated:** [April 14, 2025, 12:17pm UTC](https://clarionhub.com/t/guid-microsoft-com-uuid-mixed-endian-constants-in-clarion/8093 "2025-04-14T12:17:55Z")

</div>

Some times I wondered why SV’s definition for GUIDs is structured as a group like this: GUID group, type Data1 long Data2 short Data3 short D…

---

## [Ripe for some re-factoring, a sample program](https://clarionhub.com/t/ripe-for-some-re-factoring-a-sample-program/8021)

<div class="topic-metadata">

**Author:** [@jslarve](https://clarionhub.com/u/jslarve)\
**Replies:** 14\
**Last updated:** [March 25, 2025, 4:42pm UTC](https://clarionhub.com/t/ripe-for-some-re-factoring-a-sample-program/8021 "2025-03-25T16:42:27Z")

</div>

This is a program, where I slapped some ideas together from classes that I created over the years. The classes are of varying levels of completion, and different coding styles. If nobody beats me to it, maybe I’ll spend…

---

## [Example of Passing Window and List References to Another Thread](https://clarionhub.com/t/example-of-passing-window-and-list-references-to-another-thread/8000)

<div class="topic-metadata">

**Author:** [@donridley](https://clarionhub.com/u/donridley)\
**Replies:** 10\
**Last updated:** [March 17, 2025, 3:41pm UTC](https://clarionhub.com/t/example-of-passing-window-and-list-references-to-another-thread/8000 "2025-03-17T15:41:52Z")

</div>

Special thank you to Mark Goldberg! I wanted to know how to pass a reference to a LIST control to another thread. I wanted to access the List’s properties in the new thread. For example, the maximum number of columns …

---

## [Replace match with Stringtheory](https://clarionhub.com/t/replace-match-with-stringtheory/7981)

<div class="topic-metadata">

**Author:** [@CarlosGtrz](https://clarionhub.com/u/CarlosGtrz)\
**Replies:** 7\
**Last updated:** [March 8, 2025, 5:46pm UTC](https://clarionhub.com/t/replace-match-with-stringtheory/7981 "2025-03-08T17:46:41Z")

</div>

I need to replace the string matching a regex with another string. The new string is created by a function, which I only want to call it if there is a match. This is my current code, I wonder if there is a simpler or mor…

---

## [Crash when using GROUP with BSTRING from \`.inc\`](https://clarionhub.com/t/crash-when-using-group-with-bstring-from-inc/7996)

<div class="topic-metadata">

**Author:** [@ThaDaSoft](https://clarionhub.com/u/ThaDaSoft)\
**Replies:** 3\
**Last updated:** [March 14, 2025, 7:47am UTC](https://clarionhub.com/t/crash-when-using-group-with-bstring-from-inc/7996 "2025-03-14T07:47:25Z")

</div>

I am trying to setup an interop between Clarion and NativeAoT Compiled DotNet project - but for some reason I am getting a nasty GPF by only declaring a variable based on a type from my INC I am using BSTRING as I am wa…

---

## [Reserve words used in string cause problems renaming file](https://clarionhub.com/t/reserve-words-used-in-string-cause-problems-renaming-file/7976)

<div class="topic-metadata">

**Author:** [@Liebo](https://clarionhub.com/u/Liebo)\
**Replies:** 6\
**Last updated:** [March 3, 2025, 3:32pm UTC](https://clarionhub.com/t/reserve-words-used-in-string-cause-problems-renaming-file/7976 "2025-03-03T15:32:57Z")

</div>

Good day only my 3rd time in 25 years to use this kind of help. I am using c5.5 h and do the following without knowing to be a problem. I have 2 string variable -fromfile and tofile these variable gets filled with a d…

---

## [Simple ChatGPT example using Capesoft templates](https://clarionhub.com/t/simple-chatgpt-example-using-capesoft-templates/6488)

<div class="topic-metadata">

**Author:** [@SerhatSatir](https://clarionhub.com/u/SerhatSatir)\
**Replies:** 19\
**Last updated:** [February 23, 2025, 6:58am UTC](https://clarionhub.com/t/simple-chatgpt-example-using-capesoft-templates/6488 "2025-02-23T06:58:05Z")

</div>

You can communicate with ChatGPT using this Clarion code and integrate it into your software. However, please remember that the application requires Nettalk and StringTheory templates developed by Capesoft to function pr…

---

## [Error "Parameter type label ambiguous (CODE or DATA)" using BIND in 11.1 (works with 11.0)](https://clarionhub.com/t/error-parameter-type-label-ambiguous-code-or-data-using-bind-in-11-1-works-with-11-0/7860)

<div class="topic-metadata">

**Author:** [@CarlosGtrz](https://clarionhub.com/u/CarlosGtrz)\
**Replies:** 6\
**Last updated:** [January 29, 2025, 8:06pm UTC](https://clarionhub.com/t/error-parameter-type-label-ambiguous-code-or-data-using-bind-in-11-1-works-with-11-0/7860 "2025-01-29T20:06:41Z")

</div>

This code compiles fine with C11.0 but fails to compile with C11.1: PROGRAM Class1 CLASS,TYPE Function1 PROCEDURE,STRING END MAP Function1 PROCEDURE,STRING END …

[Next page](https://clarionhub.com/c/code/11.md?page=1)
