Controlling the Remote Desktop size with Thinfinity® VirtualUI™

As already discussed in a previous post, one of Thinfinity VirtualUI’s features is that the desktop application doesn’t need to be limited to a fixed or predetermined size. So, each application can be set to determine its remote desktop size according to its needs or be left to be dynamic in nature.
The image below shows an application configuration panel (available from the Thinfinity VirtualUI Server manager). In this panel, we can see the Resolution attribute, which is set (in this case) to “Fit to browser window”, its default value.Control remote Desktop size with VirtualUI

The available values for Resolution are the following: “Fit to browser window” (that adjust the desktop size to the browser window size), “Fit to screen” (adjust the desktop size to the device’s screen size), and a list of possible predefined fixed values, ranging from 640 x 480 pixels to 1920 x 1200 pixels.

Both “Fit to browser window” and “Fit to screen” values are clearly dynamic, while all the remaining sizes are fixed. In desktop browsers when the defined desktop size is fixed and it does not fit within the available browser window, scrollbars will appear. In the case of mobile devices, the desktop will be automatically scaled to adjust it into the available screen canvas. However, in none of these cases, the content of the desktop (ie, all application windows) may exceed this field, and the excess will be hidden such as in the normal Windows desktop.

An in-depth look: the OnBrowserResize event

The VirtualUI.OnBrowserResize event, available in the application side, will receive any change occurring in the browser size. This would allow us to adapt the window layout as needed  (i.e. change sizes, hide, show or move elements or any other adjust what we want, depending on the received width and height values).
Below, a Delphi example:

procedure TForm9.FormCreate(Sender: TObject);
begin
   ...
   VirtualUI.OnBrowserResize := AdjustWindowSize;
   ...
end;
procedure TMainForm.AdjustWindowSize(Sender: TObject; var Width, Height: Integer;
   var ResizeMaximized: Boolean);
   var borderwidth : Integer;
begin
   if WindowState = TWindowState.wsMaximized then
      borderwidth := 16
   else
      borderwidth := 0;
   Width := Self.Width - borderwidth;
   Height := Self.Height - borderwidth;
end;

Have any questions? Contact us at [email protected] or leave a message on this same post.

Comments (3)

I am testing thinfinity, and what I see is that even with full screen and fit to browser windows some users with large screens, 1920×1080, it does not scale to the full size, there is always a blank vertical strip to the right. What is needed to do?

Hi Eduardo,
Most surely you have VirtualUI running in the console session or you have an active remote desktop session to the RDS user. This will limit maximum resolution you can reach on the browser. You should have a dedicated user to run VirtualUI and ensure no one starts a remote session with this user.
Please contact [email protected] if you need any assistance.

Why -in this example- are you modifiying the received browser size? Are you changing the browser size from the delphi app? Isn’t it the delphi form size (self.width) the one that need to be adjusted to the browser size, and not the opposite?

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.