简体   繁体   中英

3D Screensaver interfering with WPF application (Windows XP)

I have a fairly large application that uses WPF for its user interface. I recently found an unusual defect regarding 3D screensavers. The 3D screensavers 3D FlowerBox,3D Flying Objects,3D Pipes,3D Text causes 1 of my WPF windows to disappear when the screensaver activates. Other screensavers are fine.

My application only encounters this problem on Windows XP.

I have some experience with DirectX. When a 3D screensavers activates, the d3d device context will be switched to exclusive mode. I reckon that WPF has trouble restoring the device context when the device switches back to cooperative mode (hence why its only affecting windows XP)

Has anyone seen such a scenario occur before ? Is there a remedy for the problem ?

Windows XP SP3, DirectX 9.0c, .NET 3.5

Not that exact one, but I have definitely seen strange problems with WPF and Windows XP, especially. The easy thing to say would be that you should try to move to Windows 7 ASAP, but then I would just be a jerk.

First off, check your video device driver. We've had a lot of problems with WPF on XP when an old graphics cards' device drivers are used. Update it to the latest version. That could take care of it.

If that doesn't work, and if you can, try swapping the video card for a different brand. That, too may work (though highly undesirable).

Third -- is your window semi-transparent or non-rectangular? If you switch your WPF app to be a regular, rectangular, boring, ugly Windows XP window, we've found that a lot of these quirks went away when we stopped getting fancy with our main windows. My guess is that it has something to do with the fact that XP has no desktop window manager. But then again I don't really know.

I know this is all very unsatisfying. We've had stuff like this happen to us on XP. I'm praying for our IT department to be able to move us to 7 this year...

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM