jna getDesktop BringWindowToTop
我在激活桌面窗口时遇到问题。
我采取了以下方法
1:GetDesktopWindow来检索桌面的句柄(这有效) 我尝试过以下方法将桌面窗口置于顶部,但它们不起作用。
SetForegroundWindow
SwitchToThisWindow
ShowWindow
BringWindowToTop
我做错了什么吗?或者用jna无法显示桌面?
I'm having problems activating desktop window.
I have taken the following approach
1: GetDesktopWindow to retrieve the handle of desktop (This works)
I have tried the following methods to bring desktop window to top, but they did not work.
SetForegroundWindow
SwitchToThisWindow
ShowWindow
BringWindowToTop
Is there something i'm doing wrong? Or is not possible to show desktop with jna?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
一种方法是获取任务栏的句柄并向其发送一条消息以隐藏所有窗口,也许像这样的方法在 Windows 7 上对我有用:
看起来还有另一种方法可以通过 Shell32 库调用(涉及 ToggleDesktop function -- 对于 C# 版本,请查看此 SO 链接),但我还没有让它发挥作用。
One way is to do get the taskbar's handle and send it a message to hide all windows, perhaps something like this which has worked for me on Windows 7:
There looks to be another way to do this via Shell32 library calls (something involving the ToggleDesktop function -- for a C# version, check out this SO link), but I've not gotten it to work yet.