none
WinForms control display in TerminalServer environment RRS feed

  • Question

  • Hi all,

    we have a WinForms application, and on one of it's form we have to display several controls (text boxes, combos, checkmarks etc.). This form performs well on the development machines (on several ones), what means it displays in less than a second, but when we put it into the working environment to a TerminalServer (Windows 2003), the display of the same form takes about 5-6 seconds. Clearly the screen refreshes from bottom to top. We have an old, native Win32 application, what was written in Delphi, where we have the same form, same number of controls, same structure, it displays on TS in less than a secon.
    So now we are desperate to find out what can be done. How can we improove the speed of the displaying this form. We realised the same sluggishness, if we minimise the applicaiton, and than restore into the original size, or if an other application comes to front, and hides our app.
    We looked into NGen, but I am affraid it is not for u. We have no problem with the application startup time, only this particular form is really slow.

    Any advice?

    Thanks and best regards:

    Peter
    Tuesday, April 7, 2009 9:52 AM

Answers

  • The bottom-to-top update spells trouble for you.  Clearly the form image is transmitted as a bitmap instead of a sequence of GDI commands.  Old native Win32 apps would use GDI, .NET apps use GDI+ and that isn't likely to be virtualized by the terminal server.

    Six seconds is a looong time for a bitmap to be transferred.  Remote desktop or something like VNC over the internet can beat that easy, at least on my laptop.  You'll need to throw hardware at the problem.  The network should probably be your first target.  The Technet forums are the best place to ask follow-up questions.
    Hans Passant.
    • Marked as answer by Zhi-Xin Ye Monday, April 13, 2009 9:19 AM
    Tuesday, April 7, 2009 11:06 AM
    Moderator