Windows 10이 정확히 같은 위치에서 정확히 같은 크기로 프로그램을 열도록 하려면 어떻게 해야 합니까?

Windows 10이 정확히 같은 위치에서 정확히 같은 크기로 프로그램을 열도록 하려면 어떻게 해야 합니까?

최근에 집에 있는 PC를 Windows 10으로 업그레이드했습니다. Windows 7에는 시작 시 두 번째 모니터에서 열리도록 자주 설정하는 몇 가지 시작 프로그램이 있었습니다. 이러한 프로그램은 항상 같은 위치에서 같은 크기로 열립니다. 나는 이것이 Windows 및/또는 프로그램 자체의 기능이라고 가정합니다.

Windows 10에서는 일부 프로그램에서 이 동작이 표시되지 않는 것으로 나타났습니다. 구체적으로 같은 위치에서 열리지만 가로 방향으로 10-20px 더 짧습니다. 예를 들어 시작 시(또는 일반적인 사용 중에도) Windows를 수평으로 최대화합니다 explorer.exe. 하지만 탐색기를 다시 열면 창의 왼쪽과 오른쪽에서 너비가 10-20px만큼 가져옵니다.

여기에 이미지 설명을 입력하세요

위 이미지에서 상단 부분은 탐색기가 열려 있고 수평으로 최대화된 모습을 보여줍니다. 하단에는 탐색기를 닫은 후 다시 열린 탐색기와 Windows에서 설정한 기본 위치 및 크기가 표시됩니다. (연한 파란색은 이미지 배경이고, 검은색은 데스크탑 공간의 "무인 토지"이며, 진한 회색은 내 데스크탑 배경이고, 빨간색 선은 창 너비가 누락된 일반적인 위치를 나타냅니다.)


Windows 10을 강제로 실행하려면 어떻게 해야 하나요?진심으로항상 같은 위치에서 같은 크기로 프로그램을 열까요?

일부 프로그램에는 이 문제가 없습니다. 특히 Firefox의 경우 항상 동일한 크기와 동일한 위치에서 열립니다. 나는 이것이 Firefox의 기능이라고 전적으로 확신합니다. Windows'라고 가정 explorer.exe하면 이 문제도 Windows 측에 있다는 것을 알고 있습니다.

답변1

스크립트 언어를 사용하는 무료 도구가 있습니다. 오토핫키.

gallaxhar라는 사용자가 게시물에 스크립트를 만들었습니다. 각 프로세스의 마지막 창 위치를 자동으로 복원 사용자 입력이나 설정 없이 창 위치를 저장하는 자동 창 관리자 역할을 합니다. 현재 활성 창 정보(id 및 프로세스 이름)를 가져오는 방식으로 작동합니다. 최신 창 크기/위치를 ini파일에 저장하고 새 창 ID가 활성화되면 해당 파일에서 읽습니다. 실행된 후에는 창 크기만 자동으로 조정하고, 새 ID의 크기만 자동으로 조정하며, 해당 ID에 대해 한 번만 수행합니다.

AutoHotkey를 설치한 후 스크립트를 파일에 넣습니다 .ahk. 실행하려면 두 번 클릭하여 테스트하세요. 트레이바에 녹색 "H" 아이콘이 표시되며, 마우스 오른쪽 버튼을 클릭하여 종료할 수 있습니다. 올바르게 작동하는 것으로 입증되면 시작 폴더에 넣을 수 있습니다.

스크립트를 테스트했는데 귀하의 시나리오에서 작동하는 것 같습니다.

스크립트는 여기에 재현됩니다.

; Automatically Restore Previous Window Size/Pos

; To make this script run when windows starts, make sure RegistryAdd.ahk is in the same directory as this script, run this script, and it will be added to the registry. Then delete RegistryAdd.ahk
#Include *i RegistryAdd.ahk

; To easily remove the previously added registry entry, make sure RegistryRemove.ahk is in the same directory as this script, run this script, and it will be removed from the registry. Then delete RegistryRemove.ahk
#Include *i RegistryRemove.ahk

#SingleInstance Force
#Persistent
#NoEnv
;#NoTrayIcon
SetWinDelay, 50
Process, Priority, , Normal

MatchList := ""

; Build the MatchList
WinGet, id, list,,, Program Manager
Loop, %id%
{
    this_id := id%A_Index%
    if (MatchList = "")
    MatchList := this_id
    else
    MatchList := MatchList . "," . this_id 
}

; ExclusionList
ExclusionList = ShellExperienceHost.exe,SearchUI.exe

; The main program loop, which manages window positions/sizes and saves their last known configuration to an ini file in the script directory.
Loop,
{
    Sleep, 350
    WinGet, active_id, ID, A
    if active_id not in %MatchList% ; Then this is a new window ID! So, check if it has a configuration saved.
    {
        MatchList := MatchList . "," . active_id ; This window ID is not new anymore!
        WinGet, active_ProcessName, ProcessName, A
        WinGetClass, active_Class, A
        IniRead, savedSizePos, %A_ScriptDir%\WindowSizePosLog.ini, Process Names, %active_ProcessName%
        if (savedSizePos != "ERROR" AND active_Class != "MultitaskingViewFrame" AND active_class != "Shell_TrayWnd") ; Then a saved configuration exists, size/move the window!
        {
            StringSplit OutputArray, savedSizePos,`,
            if (active_ProcessName = "explorer.exe" AND active_Class != "CabinetWClass")
            {

            }
            else
            {
                WinMove, A,, OutputArray1, OutputArray2, OutputArray3, OutputArray4
            }
        }
        else ; No saved configuration exists, save the current window size/pos as a configuration instead!
        {
            WinGetPos X, Y, Width, Height, A
            WinGet, active_ProcessName, ProcessName, A
            WinGetClass, active_Class, A
            If (X != "" AND Y != "" AND Width != "" AND Height != "" AND Width > 0 AND Height > 0 AND active_Class != "MultitaskingViewFrame" AND active_class != "Shell_TrayWnd")
            {
                if (active_ProcessName = "explorer.exe" AND active_Class != "CabinetWClass")
                {

                }
                else if active_ProcessName not in %ExclusionList%
                {
                    IniWrite %X%`,%Y%`,%Width%`,%Height%, %A_ScriptDir%\WindowSizePosLog.ini, Process Names, %active_ProcessName%
                }
            }
        }
    }
    else ; Save/overwrite the active window size and position to a file with a link to the processname, for later use.
    {
        WinGetPos X, Y, Width, Height, A
        WinGet, active_ProcessName, ProcessName, A
        WinGetClass, active_Class, A
        If (X != "" AND Y != "" AND Width != "" AND Height != "" AND Width > 0 AND Height > 0 AND active_Class != "MultitaskingViewFrame" AND active_class != "Shell_TrayWnd")
        {
            if (active_ProcessName = "explorer.exe" AND active_Class != "CabinetWClass")
            {

            }
            else if active_ProcessName not in %ExclusionList%
            {
                IniWrite %X%`,%Y%`,%Width%`,%Height%, %A_ScriptDir%\WindowSizePosLog.ini, Process Names, %active_ProcessName%
            }
        }
    }
}
Return

프로그램과 창의 위치와 크기도 기억하고 복원하는 상용 도구는 DeskSoft WindowManager (10$, 평가판).

이 도구는 재부팅 시 위치와 크기를 기억합니다.

답변2

이 문제는 너무 오래되고 일반적이어서 많은 개발자가 Windows OS의 결함을 해결하기 위한 프로젝트를 출시했습니다.

대부분은 무료입니다: http://www.stefandidak.com/windows-layout-manager/

또는 오픈 소스: https://github.com/lapo-luchini/WindowsLayoutSnapshot/tree/v1.3.0.0

어떤 사람들은 시작 메뉴를 맨 아래가 아닌 맨 위로 이동하면 Windows가 다르게 동작한다는 것을 알아차렸습니다.

Microsoft에 불만을 제기할 수도 있습니다. 이는 Linux 및 MacOS에서 사용할 수 있는 다른 창 관리 시스템에서와 마찬가지로 작동해야 합니다. 피드백 도구를 사용하여 불만을 제기하세요.https://support.microsoft.com/en-us/help/4021566/windows-10-send-feedback-to-microsoft-with-feedback-hub-app

관련 정보