Screen location when Notepad++ restarts
-
When Notepad++ restarts, it repositions the window at the same location as the last session (duh!). But my computer has gone from having 2 screens to only 1, and NP++ starts up on the now-nonexistent screen which I can no longer see. I assume it stores this information either in the registry or an .INI file. Where is it stored?
-
@lexedmonds Winows 11 by the way
-
You don’t need to know where this info is stored; the methods listed here can recover any off-screen program.
-
To answer the direct question, it is stored in
config.xml
, typically in the “appdata” location (put%appdata%
in your Explorer address bar, press Enter, then open theNotepad++
folder you are shown).Inside config.xml is a line like this:
<GUIConfig name="AppPosition" x="4066" y="-201" width="689" height="490" isMaximized="yes" />
If you change
x
andy
to be zero, while Notepad++ is NOT running, then save the file and start Notepad++, you should see its window appear. -
Thanks!
-
Just an additional note, which may overlap what TBugReporter pointed you to:
If you start Notepad++ and you can’t see its window due to off-screen positioning, you can press Alt+spacebar and then
m
and then you can use the arrow keys to attempt to bring the window into view. However, this is kind of a guessing game if you don’t know in which direction the window is offscreen, because the arrows will move the window in a definite direction, which may be the “wrong way” for success.What I find arguably easier is to do Alt+spacebar and then
m
and then press a single arrow key once (and release it). Then start moving the mouse in big sweeping motions (don’t press any mouse buttons or other keys on the keyboard at this point) and it should be much faster to get the window on-screen. What happens in this case is that the window “sticks” to the mouse location and moves with it as you move the mouse.I’m not sure why the single arrow key press is necessary after the
m
press; this part overcomplicates things IMO. I’m on Windows 11, but IIRC this is how it works on most versions of Windows. -
@Alan-Kilborn said in Screen location when Notepad++ restarts:
I’m not sure why the single arrow key press is necessary after the
m
press; this part overcomplicates things IMO. I’m on Windows 11, but IIRC this is how it works on most versions of Windows.The best way to have the behavior make sense is to keep in mind that Windows is mouse, not keyboard, oriented. Traditional Windows allows people to move non-maximized applications using the mouse by positioning the mouse cursor to an application’s title bar, hold the mouse button down and drag the application around. When they added support for multiple mouse buttons the main mouse button became the left-click button. You move applications by positioning the mouse cursor to an application’s title bar, hold the left mouse button down and drag the application around.
The thing in the upper-left corner of an application is the shortcut menu. Historically, it was part of the title bar and always available and visible. These days the shortcut menu is often not visible but is still available via the
Alt+spacebar
keyboard shortcut.Alt+spacebar
or activating the shortcut menu and then selecting “m” for moving with the mouse or keyboard causes the the mouse cursor to jump to the middle of the foreground app’s title bar. This is useful for recovering a mouse cursor that’s hiding somewhere on or off the screen. It also positions in the mouse cursor in the middle of the title bar which is the right spot for then using the mouse button (or it’s left-click button) to drag the application window around.When you do
Alt+spacebar
and thenm
and then any of the arrow keys on the keyboard the window manager then realizes you want to use the keyboard to move the mouse. The main goal though is to assist people in using the mouse. That’s where the trick of then sweeping the mouse around becomes a useful way to find an application that is positioned somewhere off the screen.Alt+spacebar
to activate the shortcut menu is also useful to help locating a hidden or lost application as it will pop up on the edge of the monitor nearest to where the application is hidden or parked. -
@mkupper said in Screen location when Notepad++ restarts:
Alt+spacebar to activate the shortcut menu is also useful to help locating a hidden or lost application as it will pop up on the edge of the monitor nearest to where the application is hidden or parked.
Yes, this is a good tip, as it gives one a hint in what directional arrow to use (if one’s going to use the keyboard) in order to get the app back on-screen. However, if it is “far” away, the user may hold down the arrow key for a LONG time and think it isn’t working…
-