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

Cookie Preferences
Privacy and Cookie Policies
Cybele Software implements specific policies to enhance your browsing experience while respecting your privacy. When you visit Cybele Software's website, the site uses cookies to personalize your experience. These small files remember your preferences and the details of your repeated visits, aligning closely with Cybele's Privacy Policy.

You have complete control over the cookies used during your visit:
- Accepting All Cookies: You can agree to the use of all cookies by clicking “Accept All.” This provides a smoother, more integrated experience.
- Customizing Cookie Settings: If you prefer to manage your preferences, you can click on "Cookie Settings." This allows you to give controlled consent by selecting which types of cookies you agree to activate.
- Opting Out: You also have the option to opt-out entirely from non-essential cookies. It's important to note that choosing this option might impact your experience on the website, potentially limiting certain functionalities and features.
These features ensure that you can tailor your browsing according to your personal preferences and privacy concerns.