I wrote a Script to Automatically map out any Monitor Configuration and to Move any Active Window in various ways (link to the Script below). The Script works well, but I'd like to optimize it. One functionality I never figured out how to do was: Moving a Maximized Window to a Different Monitor. In the Script, I deliberately don't Restore the Window before Moving it because I found that the process was just too slow (the sequence would have been: Restore Window, Move Window, Maximize Window). One consequence of my Script operating this way is: When you Restore a Maximized Window that has been moved this way, it reappears on the Monitor you first moved it from. And this is the part I don't quite understand.
My half-baked Theory: When you Move a Maximized Window, "Windows" Moves the Window (the "Display" part) without changing the Monitor Addressing (if that is even a thing. The "Address" which would be something that says "Window A" belongs to "Monitor B"). When you Restore a Window, "Windows" then "remembers" on which Monitor it is addressed to, and Displays it on that Monitor. And if you move a Window that isn't Maximized (that is Restored), my hypothesis would have Windows (in this specific case) update the Windows' Address when it is Moved. This may be an absolute and complete misunderstanding of what is actually going on. I have to admit: What goes on in the Back-End of Windows, Windows Handles, and everything in between is still a mystery to me.
Officially I'm asking for help. When I Restore a Window, I want it to remain on the Monitor it is right now. Eg.: If my Window is on Monitor 4 while it's Maximized, when I Restore it, I want it to stay on Monitor 4. I don't want it to reappear on Monitor 1, where I Moved it from. I could potentially Fix this within my Mapping Script, but that would require building a History Backlog of every Window that gets opened. The Size and Position of every Window would have to be saved every time they are Moved, and before they get Maximized, so that when they are Restored they may be re-positioned on the "New" Monitor at the same place, with the same size. It just seems very tedious and clunky to me.
I will continue my thought process in the off chance my understanding might be tenable:
IF what's missing is in fact "Monitor Addressing", I would think it possible to change the Monitor Addressing, on the Back-End, only AFTER the Window has been Moved. This way I could keep the speed at which I move a Maximized Window, and I would achieve my goal of having a Restored Window stay on the appropriate Monitor.
Any help, insight, discussion or brainstorming are all welcome. Cheers.
Automatic Mapping Script:
[Mod edit: Topic seems v1-related. Thus, the topic was moved from AHK v2 help to v1 help. ]
- Home Board index AutoHotkey (v1.1 and older) Ask for Help (v1)
- Search
-
- It is currently 17 May 2024, 20:46
- All times are UTC-05:00
How does Windows work on the Back-End when Moving a Maximized Windows?
Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
- Cr8zy_Ivan
- Posts: 131
- Joined: 30 Mar 2019, 18:20
Jump to
- AutoHotkey Foundation
- About This Community
- Forum Issues
- AutoHotkey (v2, current version)
- Ask for Help (v2)
- Gaming
- Scripts and Functions (v2)
- Gaming
- Tutorials (v2)
- Tips and Tricks
- Wish List
- Suggestions on Documentation Improvements
- Bug Reports
- AutoHotkey Development
- AutoHotkey_H
- Ask for Help
- Development
- Editors
- Adventure IDE
- Old Topics
- AHK Studio
- Notepad++
- Pulovers Macro Creator
- SciTE4AutoHotkey
- Visual Studio Code
- Announcements
- General Discussion
- AutoHotkey (v1.1 and older)
- Ask for Help (v1)
- Gaming Help (v1)
- Scripts and Functions (v1)
- Gaming Scripts (v1)
- Tutorials (v1)
- Tips and Tricks (v1)
- General
- Other Utilities & Resources
- Other Programming Languages
- C/C++
- ASM
- C#
- KeySharp
- Off-topic Discussion
- RPA
- Other languages
- Looking for Volunteers in other languages
- Deutsch (German)
- Ich brauche Hilfe
- Spiele
- Skripte und Funktionen
- Tutorials
- Tooltime
- Allgemeines
- 中文 (Chinese)
- 请求帮助
- 脚本函数
- 教程资料
- 相关工具
- 其他
- Español (Spanish)
- Pedir Ayuda
- Automatización de Juegos
- Scripts y Funciones
- Tutoriales
- Otras Utilidades y Recursos
- General
- Русский (Russian)
- Помощь
- Скрипты для Игр
- Скрипты и библиотеки
- Статьи и руководства
- Прочие ресурсы и ПО.
- Свободное общение
- Français (French)
- J'ai besoin d'aide
- Scripts et Fonctions
- Tutoriels
- Autres Utilitaires et Ressources
- Hors Sujet
- Português (Portuguese)
- Ajuda e Suporte Geral
- Scripts e Funções
- Tutoriais
- Outras Ferramentas e Recursos
- Outros Assuntos
- 한국어 (Korean)