Question

I ported a Delphi desktop application to .NET(C#). Both of them are using DevExpress components and they have to be used over Remote Destop connection.

Remote Desktop connection is a slow connection. When both are tested over Remote Desktop; Delphi application seems to be much more faster then .NET one.

In .NET the pages are opening part by part like a web page laoding but i want the page to be loaded in one portion.

Can i achieve this?

PS. I used UserControl component of DevExpress as pages(tabs).

PPS. I dismissed the fade in and fade out effects of loading and splash screen components for speeding up.​

Delphi application screen video: http://www.youtube.com/watch?v=7mHHDsqe5Dg&feature=youtu.be

.NET application screen video: http://www.youtube.com/watch?v=P7N-FEcVoLQ&feature=youtu.be

Some More Details:

Sales Processing PAge as UserControl component

This is one of the most complex pages in the application. It's "XtraUserControl" User Control implementation of DevExpress(Basically the same with winforms User Control).

I used LayoutControl > LayoutControlGroup > LayoutControlItem components of DevExpress for aligning the components(grids, button, text boxes etc.) on the user Control.

And here is the Main Container for User Controls(Pages like above):

MAin Container as Form for containing the User Controls(Pages)

The main container for Tabs(User Controls like this one) is a "XtraForm" Form implementration of DevExpress. When a Menu Item is selected from the Container form, the related UserControl(Page) is loaded on the Main Container Form as a Tab item and user can navigate between tabs or open a new page(User Control) from Menu.

Was it helpful?

Solution

I'm working with DevExpress .Net controls (and moreover sometimes with their controls source code) since 2007. And it seems I know the possible reasons of visual drawback of these controls under RDP. These reasons are:
- Skinning technology (which is bitmap-based)
- Double-buffered painting

So, let me explain. When the user is connected via a Remote Desktop Connection, all drawing operations performed by control are transferred over the network connection to the RDP client for display. If control draw a line, the "DrawLine" command is sent over the network to the client. If control draw a text, a "DrawText" command is sent (along with the text to draw). But if control draw a bitmap, the entire bitmap needs to be transferred over the network. Thus this can be a main bottleneck when using low-bandwidth connection.

The double-buffered painting is based on performing all drawing operation into an offscreen bitmap. Then this bitmap is copying onto screen with using BitBlt method. This technique is used in DevExpress controls to draw various visual effects and smooth animations. This avoid any flickering in controls when control's elements are redrawn quickly and also is used for drawing skinned control elements (more details below). But when RDP is used the BitBlt-operation is also transferred over the network as the entire bitmap thus this is a problem when using low-bandwidth connection.

The DevExpress Skinning technology is bitmap based. A skin is a set of bitmaps that determine how control elements should be painted in all its possible states (normal, hot-tracked, selected, pressed, etc.). When control paint itself, it draw these bitmaps, - element by element. It allow DevExpress controls to be so beauty and pixel-perfect.
I see from your video and screenshots that your .Net application is used skins (and it seems that the concrete skin is the "DevExpress Style") but your Delphi/VCL application is not skinned. Is it true? I believe, yes. So the possible way to reduce the drawback of your application is disabling skinning for forms and using Flat Style for control:

// .NET application, Program.cs
...
DevExpress.Skins.SkinManager.DisableFormSkins();
DevExpress.Skins.SkinManager.DisableMdiFormSkins();
DevExpress.LookAndFeel.UserLookAndFeel.Default.SetFlatStyle();
...

Related help topics: Look And Feel Overview, Look and Feel Mechanism

I should also note that the Flat-painting is not double-buffered, thus it is may be a possible solution for slow RDP connections.

Important Exceptions: Some DevExpress controls does not supports Flat-painting (for example RibbonControl). I know that the LayoutControl, the XtraGrid and most of XtraEditors are supports flat-painting. You should contact DevExpress directly about the another controls.

P.S. @David Heffernan: Thank you for pointing me into right direction.
P.P.S. All things i've mentioned in comments erlier are true things which can increase an application performace at application startup and in general. But these things is unrelated to the original problem with network traffic.

UPDATE
Related DevExpress Support Article:
How to speed up Windows Forms applications, running in a Remote Desktop Services (formerly known as Terminal Services) environment

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top