想要调整在 Windows 中运行的其他应用程序的大小 [英] Want to resize other applications running in Windows

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

问题描述

我正在寻找最简洁的方法来打开所有窗口并可以移动/调整它们的大小.我希望能够获取它们当前的位置并将它们移动到我想要的位置.

I'm looking for the cleanest way to get all open windows and have access to moving/resizing them. I'd like to be able to get their current locations and move them where I'd like.

我想访问所有窗口,而不仅仅是顶级窗口.

I want access to all windows, not just top level ones.

谢谢

推荐答案

  • 本教程显示了一种获取正在运行的进程列表的方法:用于进程检索的 Win32 API.另一种方法是通过 EnumDesktopWindows.

    • One way to get the list of processes running is shown on this tutorial: Win32 APIs for Process Retrieval. Another way is through EnumDesktopWindows.

      如果此时您可以访问窗口的句柄,则可以使用 SetWindowPos().但是,如果您只能访问它的标题,则需要使用 FindWindow() 首先获取该窗口的句柄.

      If at this point you have access to the window's handle then you can move it with SetWindowPos(). But if you only have access to it's title, then you'll need to use FindWindow() first and obtain a handle to that window.

      这是一个示例显示了如何对特定窗口执行多种不同的操作,包括如何将其移动到另一个位置.

      Here is an example that shows how to do several different operations on a specific window, including how to move it to another location.

      这篇关于想要调整在 Windows 中运行的其他应用程序的大小的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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