Change browser behavior using ‘ClientSettings’

Publish any Windows application to the web with Thinfinity Remote Desktop

ClientSettings is an additional interface variable for Thinfinity VirtualUI LibraryIn our last post, we started with a new “notes and tips” series aimed at helping developers take full advantage of Thinfinity VirtualU’s existing possibilities.
In the present note, we will focus on ClientSettings.

ClientSettings is an additional interface available at the Thinfinity VirtualUI Library. It allows developers to remotely and programmatically configure particular browser settings. These settings are related to the cursor visibility and some specific touch action behaviors.


The properties

This table shows a detailed explanation of the ClientSettings interface’s current properties:

Property Use Values
CursorVisible It is used to set show or hide the mouse pointer. True / False
MouseMoveGestureStyle It defines whether the mouse movement is read as relative or as absolute, in touch devices. MM_STYLE_RELATIVE = 0MM_STYLE_ABSOLUTE = 1
MouseMoveGestureAction It indicates if the drug should be interpreted as scrolling or as a turn of the mouse wheel, causing a shift-only item on which the action is triggered. MM_ACTION_MOVE = 0,MM_ACTION_WHEEL = 1

 

These properties were created to provide a better end-user experience for mobile users.
When using a mobile or other touch device, it is unusual for a mouse pointer to be displayed. Instead, the device will interpret finger gestures as different commands, acting on the element or elements that are located where the gesture is made.
As our applications were designed to run on Windows desktop and resolve mouse movements, this device behavior can be tricky. Oftentimes, the best solution to this issue is to show the pointer and simulate the mouse actions from the gestures captured.

THE SOLUTION PROPOSED

The properties that we have presented above will help us to define the ideal settings to enjoy the best possible and intuitive user experience for our application.
The following example shows how to recognize a touch device or mobile device, and if detected, to change the pointer behavior.

The following list is not complete, but it will give you an idea:

 vui = new VirtualUI();
 userAgent = vui.BrowserInfo.UserAgent.ToLower();
 if ((userAgent.IndexOf("touch") != -1) || (userAgent.IndexOf("mobile") != -1) ||
     (userAgent.IndexOf("iphone") != -1) || (userAgent.IndexOf("ipod") != -1) ||
     (userAgent.IndexOf("ipad") != -1) || (userAgent.IndexOf("android") != -1) ||
     (userAgent.IndexOf(" cros ") != -1)) {
         vui.ClientSettings.MouseMoveGestureStyle = MouseMoveGestureStyle.MM_STYLE_ABSOLUTE;
         vui.ClientSettings.MouseMoveGestureAction = MouseMoveGestureAction.MM_ACTION_WHEEL;
 }

This would be the end of this week’s small technical note. We wanted to provide a simple tip to help you take advantage of the features added to your applications through the adoption of Thinfinity VirtualUI.
We invite you again to share with us your concerns and/or experiences.

 

Thinfinity Solutions for remote desktop, screen sharng, digital workspace and application virtualization.

Thinfinity Solutions

As you already know, Thinfinity VirtualUI is a web-enabling SDK to run apps on a browser without rewriting the code.

Explore our other remoting and web-enabling solutions, enjoy our free trials, or request a custom demo HERE. No commitment!

We will be happy to assist you and show you our portfolio for remote desktop, screen sharing, digital workspace, and application virtualization.

Leave a comment

Privacy Preferences
This website uses cookies to improve your experience while you navigate through the website. Out of these, the cookies that are categorized as necessary are stored on your browser as they are essential for the working of basic functionalities of the website. We also use third-party cookies that help us analyze and understand how you use this website. These cookies will be stored in your browser only with your consent. You also have the option to opt-out of these cookies. But opting out of some of these cookies may affect your browsing experience.