Using ClientSettings from Javascript

ClientSettings is an additional interface available in the Thinfinity VirtualUI Library that allows developers to programmatically configure some browser environment layout and behavior settings from their applications (e.g., the mouse movement type).

This interface is available both in the application (C++, C#, Delphi, etc.) and in the browser side, where it was extended to manage some web interface elements (the DockMenu widget, for the moment). ClientSettings is available in Javascript as a Thinfinity.VirtualUI attribute:

var vui = new Thinfinity.VirtualUI();
var clientSettings = vui.ClientSettings;

All ClientSettings attributes have a default value that determines the typical behavior in each case. Developers can change it by setting new values to these attributes, which override the defaults before the connection starts.

To hide the mouse pointer and remove the “Error Reporting” icon from the DockMenu, just do the following:

var vui = new Thinfinity.VirtualUI();
var clientSettings = vui.ClientSettings;

clientSettings.CursorVisible = false;
clientSettings.DockMenu.ErrorReporting = false;

ClientSettings Applying Order

As most of the ClientSettings values can be applied both in the browser side and the application, we need to define an applying order:

· A value set in the application overrides the default value.

· Any value set in the browser side always overrides any other value.

Read more about how to change browser behavior using ClientSettings.

Last updated