How to open a new window in windows form application?

What determines where an application window opens in Windows 7?

  • What determines where an application window opens in Windows 7? I'm running dual monitors in Windows 7. I have to do some repetitive tasks that require opening Word docs, saving to PDF, then combining other PDFs into that PDF. I always have to move the documents around to access dialogs and such, which slows me down and is generally annoying. Why won't the damn things open in the same position I moved them to before I closed them? Is this a dual monitor thing? Is there some way to set certain file types to always open in the previously-used location?

  • Answer:

    The app gets to decide, or it gets to tell Windows to use the Default. It's not uncommon that apps remember their position, and then smart apps make sure their position is somewhere that's not off the screen when they next start, and dumb smart apps get that logic wrong with multiple monitors. One thing I've seen go wrong happens if the secondary monitor is to the left of or above the primary one. 0,0 is the top left corner of the primary display, If other displays extend further left or further up than that, they may have negative coordinates. One way naive apps screw up "is this a sane place to put a window" logic is to just rule out negative coordinates. You can get around that by switching which monitor is the primary one.

schoolgirl report at Ask.Metafilter.Com Visit the source

Was this solution helpful to you?

Other answers

I've found that, in some apps at least, if you maximize the window or use the "snap to height" feature, the app won't "remember" its position for next time. Chrome does this to me, and I just tested this with Notepad too and it does the same thing.

neckro23

Generally, the placement will be that the new window will be one titlebar-height below and to the right of the upper left hand corner of the titlebar of the last window opened. If you're noticing that they're created along a diagonal, that's what I'm talking about.

rhizome

Yes, apps do typically remember their position but only the last open instance remembers it. For example, if you have two open PDF's on different parts of the screen. You then close them Adobe will only remember the position of the one you close last. The next time you open a PDF it will open in the position of the last one you close. It doesn't remember which file you had where it only remembers where the last one closed was.

Confess, Fletch

Related Q & A:

Just Added Q & A:

Find solution

For every problem there is a solution! Proved by Solucija.

  • Got an issue and looking for advice?

  • Ask Solucija to search every corner of the Web for help.

  • Get workable solutions and helpful tips in a moment.

Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.