I recently had a situation where a program had a file or a folder locked and I had no idea what program that might be!

I needed to restore a folder from a Macrium backup but I didn't want to just overwrite the folder, so I wanted to rename it.  But I wasn't able to do that because some processes had a folder or file locked in there.

After some search, I found an answer that didn't need any additional software to be installed, but rather use a tool that has been in Windows for several versions.  The Resource Monitor!  The answer can be found on Superuser.com

Run the Resource Monitor, then go to the CPU tab, and expand the "Associated Handles" panel - see the screenshot below.

Click the checkbox next to "Image" at the top of the "Processes" list and it will select all the processes in the list.

The "Associated Handles" will then fill in - it can take a few moments if there are a lot of processes running.

You can then sort and filter the list to narrow it down to what you are looking for, see the screenshot below.

Here I have filtered it to show "C:\" so it will show any files on the C:\ drive that are locked.  I also sorted it by the "Handle Name" so it is easy to find based on the path.

You can also find services, sessions, registry keys etc., so this is a very easy way to find things.  For more powerful options, using Processs Explorer from SysInternals/Microsoft has more options and is also 100% free and certainly an excellent tool along with Process Monitor.

I have a website that I like to visit, but I'd like to open it in its own browser window, without any of the toolbars at top, etc. After some digging, I found that Chrome actually has some interesting stuff available for command-line control. So I created a shortcut and used this:
"C:\Program Files (x86)\Google\Chrome\Application\chrome.exe" --profile-directory="Default" --new-window --window-size=300,300 --app=
And then the url for the website after --app= Works like a charm, but a long-standing bug in Chrome (reported 7 years ago and, well, not fixed yet 😉 makes the --window-size not work. However with the --profile-directory="Default" it saves the last used size for the window in the user profile and opens in the last used size.
 
In my case, I wanted to open CBC One in Victoria, so my full command line is:
"C:\Program Files (x86)\Google\Chrome\Application\chrome.exe" --profile-directory="Default" --new-window --window-size=300,300 --app=http://prod-chrome80-player-popup.s3.eu-central-1.amazonaws.com/popup_player_v1.html?station=cbcvictoria&tenant=www.radio.net
 
This opens the radio station up in a popup window (NOT existing Chrome window) and the size is saved.  So I now have a nice little window for my radio station!
 
For those who want to dig deeper (I've not even scratched the surface) here is the official list of command-line arguments for the Chromium project:
 
It's only 52 pages!!!
Since Windows Edge is based on Chromium, this should work for both Chrome and Edge.
Enjoy!

With larger monitors and more monitors, I have found that it has become increasingly difficult for me to find the mouse cursor on the screens.

I remembered that there used to be some ways to change the cursors and set out to find it.  Turns out it's pretty easy!

Start by going to the Windows Settings app by selecting it from the start menu.

From the Windows Settings app, select "Ease of Access"

On the "Ease of Access" page select the "Cursor and Pointer" option on the left and then you can change the cursor size and color and also the caret thickness.

Since most of the windows I work on have a light background, I chose to use the black cursor and set the size to 3.  You can only see the number for the size when you move the slider, but I found 3 to be a good size for both my 27" 1080p monitors as well as my 32" QHD (2560x1440 pixels)

SQLite databases came up on one of the newsgroups this week.  I have not used the SQLite driver in Clarion, so I don't have any experience with it - yet.

For many years I have used HeidiSQL with MySQL and MariaDB databases and it works great.  But it can only work with MySQL, MariaDB and MS-SQL.  So I wondered what tools there might be out there to use to browse and work with SQLite databases.  Both are open source and free and both work with Windows, MacOS and Linux.

I found two that looked interesting!

SQLite Database Browser

This program has been around since 2003 and the last release was in April of 2019 so it's being fairly actively developed.  It is available for Windows, MacOS, Linux (several variations) and FreeBSD.  This tool is primarily a database browser and based on the few screenshots I've found it looks a bit limited.

SQLite Studio

This program has also been around since 2007 and the last release was in July 2018.  This program looks like HeidiSQL and you can view data, enter your own queries etc.  It is available for Windows, MacOS and Linux.

In my experience one of the most important tools when dealing with database is a good, solid interface to execute queries and statements.

Build Automator uses MSBuild to compile projects and solutions no matter if they are in Visual Studio or in Clarion.  By default, MSBuild is a single thread program, but there is a way to tell it to start multiple processes to compile.

After some experiments on a virtual machine, I'd say it's definitely worth it to try it out and see if it helps.  What you need is the /maxcpucount parameter which you can add to the "Additional Parameters" tab on the "Call MS-Build" action in Build Automator.

Compile with MSBuild

The benefit may not be as much as you had hoped for, but it definitely does improve performance.  Here are some numbers.  This was tested on a Windows 10, 64bit virtual machine in VMWare 12.5.  It is set up with 5.7GB of RAM.  In the first test it was set to use 1 CPU and 2 cores.

15:42:59.898
15:45:54.809 00:02:54.911  without /maxcpucount
15:33:22.832
15:36:04.000 00:02:41.168 with /maxcpucount:2
15:52:48.811
15:55:21.083 00:02:32.272  with /maxcpucount:8

In this test, I was able to shave off about 38 seconds with the 8 CPU setting.  Your milage may certainly wary as this may be different outside of virtualized environment and it may be different depending on what CPU you have and a lot of other configurations.  No errors were reported and everything seemed to compile correctly.

All generated files were destroyed before each test and ClarionCL.exe was used to generate.  The Clarion IDE was not involved at all in this process and was closed while the testing was performed.  Only command line utilities.

Bottom line is if you are compiling larger solutions with Build Automator, then you should check out the /maxcpucount parameter.  For more information about this parameter, please see the information on the MSDN Website

Couple of days ago I stumbled on an excellent article about the pitfalls of code signing!

https://arstechnica.com/information-technology/2017/11/evasive-code-signed-malware-flourished-before-stuxnet-and-still-does/

Couple of excerpts:


"Now, researchers have presented proof that digitally signed malware is much more common than previously believed."

"Surprisingly, weaknesses in the majority of available AV programs prevented them from detecting known malware that was digitally signed even though the signatures weren't valid."

"The third key weakness in the code-signing ecosystem was the failure of certificate authorities to verify the identities of people applying for code-signing certificates. "

"Malware with the same digital DNA as Stuxnet—Duqu discovered in 2011 and the Duqu 2.0 that infected Kaspersky Lab's corporate network starting in 2014—also used code signing."


Just because an executable is code signed does not really tell much.  You can EDIT code signed executables and they will run just fine - assuming that you do not change the binary code that actually makes them run;)

You can protect your software by validating the code signature inside the application.  That way if the signature is tampered with, you can prevent the program from running.

Yesterday I was messing around in the IDE and noticed the ASCII table in the Toolbox pad and realized it was missing the Extended ASCII characters (ASCII 128-255)  This morning I got an email from ClarionHub, which hosts a repository on Github with some goodies - including an updated ASCII table with updates from Mark Goldberg.  I played around with it and have now added all the Extended characters to the table and committed it back to Github.  I have also made it available for download here on Icetips at http://www.icetips.com/files/ASCIITable.xml

Once you have saved the file, you need to go to the folder where Clarion is installed and then navigate to "data\options\TextLib" and you will find ASCIITable.xml there.  Make a backup copy of it and then copy the file from Icetips over it.  Restart the IDE and you should now get the full extended ASCII table.

There are two more files in the repository on Github, "CW File Access Modes.xml" and "CWErrors.xml"  The first one contains all the values for file access modes and the second one contains a list of run-time errors you may encounter and what they mean - see screenshot below:

Clarion10ToolboxWithCWErrors

 

So, check those files out - they may be helpful to you:)

Arnor Baldvinsson

In the new IDE you can align controls using the snap lines; the thin blue lines that pop up when you drag controls around in the window designer. You see it appear in the screenshot below between the "Property" radio button and the drop down control, indicating that they are being align by the bottom edge of the controls.

Clarion 10 Snap lines and distance lines
Clarion 10 Snap lines and distance lines

You can also see two short lines above the drop down, which indicate optimal vertical space between the drop down control and the two radio buttons above.  The distance lines appear for both horizontal and vertical spacing.

The snap lines also appear when you are re-sizing controls which can be both good and bad.  It's good when you need to size multiple controls to be the same width or height, but it gets in the way if you just want to re-size a control, like for example the "Me and related users" radio button which originally extended outside of the group control, overlapping the border of the group.

You can re-size a control by holding down the shift key and then using the left/right, up/down arrow keys.  But you can also re-size them by using the mouse and without the snap lines getting in the way.  Simply hold down the Alt key on the keyboard and re-size or move the control with the mouse.  It will now ignore the snap lines and you can re-size and re-position at will.  Release the Alt key and the snap lines immediately appear and the control snaps into place.

Snap lines also work with multiple controls selected.

Clarion 10 Snap lines on multiple controls
Clarion 10 Snap lines on multiple controls

I use the snap lines a lot when lining things up and also the distance lines to set the distance from one control to another.  To the best of my knowledge they are not customizable in the IDE's Options, which would be desired so the distance can be changed.

Clarion 10 Window Designer Grid Options
Clarion 10 Window Designer Grid Options

You also have the option to use grids.  In my (limited) experience with grids in other environments, they tend to be coarse and not very helpful.  But this is a matter of choice and taste so please try them out to see how they work and if you like them or not.

There is no option to turn both grids and snap lines off.  Either one is always turned on.  However, with the grids you can turn off the "Snap to Grid" effectively disabling it and if you uncheck "Show grid" then it will not show up either so with that you have turned both grid and snap lines off.  It would have made sense to have a "None" radio button there for the Align Mode, but with the ability to select Grid and then effectively turning it off, it serves the same purpose.

Arnor Baldvinsson

I have been working on Build Automator in Clarion 10 this week, along with other things.  Yesterday I discovered that there was something very odd going on with the resizing of the windows.  When comparing the Search and Replace window between the Clarion 6.3 version and the Clarion 10 version, it was like the listbox wasn't stretching like it should, as seen in the screenshot below.

06.17.2015-14.59
Clarion 6.3 window on the left, Clarion 10 window on the right.

After quite a bit of snooping around and posting on the newsgroup, where Bob Campbell pointed out the listbox size issue, I came to the conclusion that there was a problem with the WindowResizeClass.SetParentDefault method in ABRESIZE.CLW.  So to test it, I copied the one from Clarion 6.3 and omitted the original and lo and behold the resizing worked perfectly again!

After sleeping on it, I realized that the code change involved a new method of finding the parent control of a control, which doesn't have a PROP:Parent parent - kind of an orphan;)

In the class method the code figures out what type of parent controls there can be:

 CASE ThisControl{PROP:Type} + 0
 OF CREATE:Group
 OROF CREATE:Option
 OROF CREATE:Tab
 OROF CREATE:Sheet

This is missing both CREATE:Panel and CREATE:Region!  I'm using Panels all over the place on the windows in Build Automator and came to the conclusion that this is where the problem was.  So I added:

 OROF CREATE:Panel
 OROF CREATE:Region

to the list, re-compiled after omitting the Clarion 6.3 code, and it worked perfectly again:) The CASE statement is around line 580 in the ABRESIZE.CLW file if you want to do this fix to your class file.  I have reported this to Softvelocity and hope they will fix this in the next release.

Arnor Baldvinsson