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.
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;