【发布时间】:2015-03-25 08:18:47
【问题描述】:
我在自定义 GUI 应用程序中有许多弹出窗口。这些弹出窗口是窗口对象,而不是弹出窗口对象。使用键盘上的“打印屏幕”按钮时,弹出窗口不会显示在屏幕截图中。相反,下面禁用的主窗口是屏幕截图中显示的所有内容。弹出窗口从不闪烁或消失,只是没有显示在屏幕截图中。
WindowInstance.IsEnabled = true;
WindowInstance.Refresh();
DisplayPopUpWindow(WindowInstance);
DisplayPopupWindow 中的代码:
private void DisplayPopUpWindow(Window theWindow)
{
if (theWindow != null)
{
if (theWindow is MessagePopup)
{
// Only show one popup at a time (queue is handled elsewhere)
RemovePopUpsCommand.Execute(true, null);
}
ActiveWindow.IsEnabled = false; // main screen disabled
foreach (KeyValuePair<Window, int> aPopup in popUpWindows)
{
if ((aPopup.Key.IsVisible) && (aPopup.Key.Opacity == 1) && (aPopup.Key != theWindow))
{
// if window is a lower priority then disable it
if (aPopup.Value > displayPriority)
aPopup.Key.IsEnabled = false;
}
}
theWindow.Show();
theWindow.Opacity = 1;
}
}
XAML 中是否有某些属性会影响窗口是否对屏幕截图可见?这是一个大问题,因为这也会影响我们使用的一些远程处理软件,因为弹出窗口不会显示在共享屏幕上。也会影响我们的组合框实现。
“弹出窗口”实际上是它们自己的独立窗口。有些实例在应用程序启动期间创建一次,并在需要时简单地显示/隐藏,但是,大多数是按需创建以显示。此问题会影响这两种类型。
使用的remoting软件是axeda access remote。
【问题讨论】:
-
这是在 WindowsXP 上发生的吗?
-
见这里:stackoverflow.com/questions/1287373/…。另一种可能是 Alt + Print Screen。
-
该软件在 Windows XP Embedded 上运行,但我在 Windows 7 中开发时遇到了屏幕截图问题。我有一个程序可以让我进行屏幕截图,但这里更大的问题是远程处理软件。我可以更改 GUI 程序本身,但不能更改远程处理软件。我认为屏幕截图问题的根本原因是相同的,并且可能会导致解决方案。
-
我之前在XP也遇到过类似的问题(远程桌面没有弹出弹窗),相信你需要为你的
Window设置AllowsTransparency="False",你可以试一试。 -
我相信我们希望窗户透明,它们有圆角,但我会检查一下...