Take the 2-minute tour ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free, no registration required.

Ok a bit of an unusual situation here.. I have a .Net winform application which when started launches 2 forms.The Main form remains on Monitor one and the other form launches into second monitor(if there is one attached). Both forms display basic graphic elements on User interface.All is well when working with 2 usual computer monitors.

Things change when I replace my usual extended monitor with an android tablet or an iphone using applications like AirDisplay(which basically allow you to use your iphone or tablets as extended monitor over wi-fi). What happens then is my main form rendering on Main PC monitor works right, but the form launching on tablet/iphone sort of freezes.

Now I understand a lag is expected, but thats not what really is happening. If I drag my main form over to tablet it renders just fine. I actually acquire images and videos using cameras on that main form and surprisingly I can actually drag my running app from one monitor over to the tablet (second monitor) and the app's UI seem to render just fine.. its the second form that doesnt render ! Interestingly, if I let my main form be on monitor one(pc) and while my second form is on tablet(frozen).. if I take my cursor over to tablet and play around with the form, the UI seems to come alive and render for few moments and then freezes again.

I did read about how WPF had a bit of rendering problem on Dual monitors. This is a winform application.

share|improve this question

closed as off topic by MainMa, Kilian Foth, MichaelT, GlenH7, Walter Jun 7 '13 at 17:06

Questions on Programmers Stack Exchange are expected to relate to software development within the scope defined by the community. Consider editing the question or leaving comments for improvement if you believe the question can be reworded to fit within the scope. Read more about reopening questions here.If this question can be reworded to fit the rules in the help center, please edit the question.

    
Is this a WPF app or a WinForms app? The title says one thing, the last sentence something a bit differently. –  JustinC Jun 7 '13 at 7:30
1  
Please don't cross post - stackoverflow.com/questions/16933135/… –  ChrisF Jun 7 '13 at 7:56
add comment

1 Answer

No matter what kind of application it is nor how it is implemented, performance through remote desktop protocol (RDP) will be sometimes shaky.

Why does it matter for performance which window is displayed through the RDP device?

Likely it is a fun combination of WPF, window threading strategy, and RDP. I would suggest that even particular RDP clients for mobile devices may not be ideal either.

The first thing that should be noted is that WPF works best when it is hardware accelerated. That is not always possible. Sometimes there are reasons HW acceleration is not used when you do not suspect any reason not to. If you haven't, you may want to wander through the Windows Platform SDK, as it includes a suite of tools for profiling WPF aspects and IIRC, show when HW is used or when it switches to SW rendering.

Next, the following link is a bit dated, and some things may have improved, but optimizing WPF for RDP might offer a few key particular scenarios to look for when trying to improve performance for that combination of concerns.

The third thing I would look at, and I suspect will offer the biggest bang for the buck, is modifying the threading strategy used for the windows you want to remote. @ReedCopsey outlines a strategy with examples for reworking window threading to allow a bit better performance when multiple windows are in use. The article is on a blog he used to maintain, but seems set aside since the first of what was going to be a two part series was published, Launching a WPF Window in a Separate Thread.

I suspect that threading might be a concern here because the likely background or child thread for the second window gets a lower priority than the main thread.

Ref:

share|improve this answer
add comment

Not the answer you're looking for? Browse other questions tagged or ask your own question.