最小化所有运行的应用程序 [英] Minimize All the Applications Running

查看:133
本文介绍了最小化所有运行的应用程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好:

如何使用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.


这篇关于最小化所有运行的应用程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆