如何在启动时(或不启动时)使另一个程序的窗口没有最大化(正常)窗口状态? [英] How to make the window of another program not maximized (normal) window state at startup (or not at startup)?

查看:67
本文介绍了如何在启动时(或不启动时)使另一个程序的窗口没有最大化(正常)窗口状态?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在推出Comodo龙浏览器的 窗口,并希望它在启动时无法最大化。



我的尝试:



I'm launching a new window of Comodo dragon browser and want it unmaximized at startup.

What I have tried:

Process[] Processes = Process.GetProcessesByName("dragon");





我正在运行所有进程名称中名为dragon的进程,在它们的句柄上一个接一个地运行:



I'm running on all processes that have the name "dragon" in the process name, on their handles one by one and running this:

ShowWindow(handle, SW_RESTORE);




SetWindowPos(handle, 0, Cursor.Position.X - 100, Cursor.Position.Y - 100, 600, 600, HWND_TOPMOST);

推荐答案

请参阅此处的提示: https://www.c-sharpcorner.com / article / controlling-window-of-other-applications-using-C-Sharp / [ ^ ]

此处还有:在C#中更改另一个应用程序的位置和大小 [ ^ ]
See tip here: https://www.c-sharpcorner.com/article/controlling-window-state-of-other-applications-using-C-Sharp/[^]
And also here: Changing location and size of another application in C#[^]


这篇关于如何在启动时(或不启动时)使另一个程序的窗口没有最大化(正常)窗口状态?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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