简体   繁体   English

3D屏幕保护程序干扰WPF应用程序(Windows XP)

[英]3D Screensaver interfering with WPF application (Windows XP)

I have a fairly large application that uses WPF for its user interface. 我有一个相当大的应用程序,它使用WPF作为其用户界面。 I recently found an unusual defect regarding 3D screensavers. 我最近发现了有关3D屏幕保护程序的异常缺陷。 The 3D screensavers 3D FlowerBox,3D Flying Objects,3D Pipes,3D Text causes 1 of my WPF windows to disappear when the screensaver activates. 3D屏幕保护程序3D FlowerBox,3D飞行对象,3D管道,3D文本会在屏幕保护程序激活时使我的WPF窗口之一消失。 Other screensavers are fine. 其他的屏保也可以。

My application only encounters this problem on Windows XP. 我的应用程序仅在Windows XP上遇到此问题。

I have some experience with DirectX. 我对DirectX有一些经验。 When a 3D screensavers activates, the d3d device context will be switched to exclusive mode. 激活3D屏幕保护程序后,d3d设备上下文将切换到独占模式。 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) 我认为当设备切换回协作模式时,WPF无法恢复设备上下文(因此为什么它仅影响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 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. 并非完全如此,但是特别是在WPF和Windows XP中,我肯定看到了奇怪的问题。 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. 容易说的是,您应该尝试尽快迁移到Windows 7,但是那样的话,我只是个混蛋。

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. 当使用旧的图形卡的设备驱动程序时,XP上的WPF存在很多问题。 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. 如果您将WPF应用程序切换为常规的,矩形的,无聊的,丑陋的Windows XP窗口,我们会发现,当我们不再喜欢主窗口时,许多怪癖就消失了。 My guess is that it has something to do with the fact that XP has no desktop window manager. 我的猜测是,它与XP没有桌面窗口管理器有关。 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. 我们在XP上遇到过类似的事情。 I'm praying for our IT department to be able to move us to 7 this year... 我希望我们的IT部门今年能够将我们提升到7名...

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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