最小化所有运行的应用程序

编程入门 行业动态 更新时间:2024-10-25 00:28:39
本文介绍了最小化所有运行的应用程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

您好: 如何使用C#最小化所有应用程序。 感谢anyhelp。

Hello: How I can minimize all the applications using C#. Thanks for anyhelp.

推荐答案

嗯,我不确定你发送了什么具体信息(你可以查一下) 我会说这样的话可能吗? (不是你将不得不替换AMessageID,TheWParam和TheLParam) Well I am not sure what specific message you send (you can look it up) I would say something like this maybe? (Not you will have to replace AMessageID, TheWParam, and TheLParam) 展开 | 选择 | Wrap | 行号

您好: 如何使用C#最小化所有应用程序。 Th anks for anyhelp。 Hello: How I can minimize all the applications using C#. Thanks for anyhelp.

我就是这样做的: 您在user32.dll上使用DllImport并获取EnumWindows,GetWindowText,GetWindowLong,和SetWindowLong。 您可以使用EnumWindows和EnumChildWindows迭代打开的窗口获取其句柄。然后在WS_MINIMIZE上检查GetWindowLong的可见性,并使用GetWindowText检查窗口的标题(可选)。然后使用SetWindowLong在窗口上设置最小化标志。

This is how I do it: You use DllImport on user32.dll and get EnumWindows, GetWindowText, GetWindowLong, and SetWindowLong. You can use EnumWindows and EnumChildWindows to iterate through your open windows getting their handles. Then you check visibility with GetWindowLong on WS_MINIMIZE and check the title of the window (optional) with GetWindowText. Then you set the minimized flag on the window with SetWindowLong.

虽然,Platter的方法是一种更好的方法来抓取窗口句柄。 Although, Platter''s method is a much nicer way to grab window handles.

更多推荐

最小化所有运行的应用程序

本文发布于:2023-11-04 05:21:49,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1557057.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:最小化   应用程序

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!