如何在显示 UAC 对话框时捕获屏幕截图?

发布于 2024-08-29 17:30:49 字数 175 浏览 6 评论 0 原文

我正在使用 Java Robot 类来截取屏幕截图,我的问题是,在 W7 中,当显示 UAC 对话框时(我右键单击任何应用程序并选择以管理员身份运行),它不会出现在屏幕截图中,或者整个屏幕只是黑色的。使用管理员权限或作为服务运行我的应用程序并不能解决问题。

有谁知道该怎么做,以便即使在显示 UAC 时我也能够捕获屏幕?

I am using the Java Robot class to take screenshots, my problem is that in W7 when the UAC dialog is shown (I right click on any application and select run as Admin) it will not appear in the screen shot or the whole screen is just black. Running my application with admin rights or as a service does not solve the problem.

Does any one know what to do so that I will be able to capture the screen even when the UAC is showing?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

榆西 2024-09-05 17:30:49

为了安全起见,普通程序无法与UAC对话框交互。

您可以手动禁用名为“安全桌面”的安全功能,并将对话框显示在普通桌面上(以便其他程序可以看到它),但不建议这样做。以下解释适用于 Vista,但 Win7 的工作方式应该类似: http://www.vistax64.com/tutorials/117448-user-account-control-uac-blacking-out-screen.html

For security, normal programs cannot interact with the UAC dialog.

You can manually disable that security feature named "Secure Desktop" and instead have the dialog displayed on the normal desktop (so other programs can see it), but this is not recommended. The following explanation is for Vista, but Win7 should work similar: http://www.vistax64.com/tutorials/117448-user-account-control-uac-blacking-out-screen.html

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文