您好: 如何使用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.
更多推荐
最小化所有运行的应用程序
发布评论