mediainfo-gui icon indicating copy to clipboard operation
mediainfo-gui copied to clipboard

Let MI remember window size and position on screen

Open pstein opened this issue 3 years ago • 5 comments

After MI is started I resize the window and move it to another position on screen.

Unfortunately MI does not remember the new size and pos.

Can this remembering added in the next release?

pstein avatar Feb 12 '22 08:02 pstein

It would be possible to add this, as an option. But, at this time, MediaInfo GUI does not even create/read a configuration file where such options (or the previous window position) could be persisted. So maybe in some future version...

lordmulder avatar Feb 12 '22 12:02 lordmulder

Since probably most users will maximize the window (which is usually necessary to see as much of the media info as possible) a good compromise would be to default the app to maximized. This could be coded without any need to create/read a configuration file.

githottub avatar Aug 20 '24 15:08 githottub

Simply create a shortcut to MediaInfoXP.exe, edit the properties of the shortcut and change "Run:" to "Maximized" 😏

lordmulder avatar Aug 20 '24 17:08 lordmulder

Yeah, I know but there will be many others who aren't aware of this method. Therefore, I was thinking if you just coded it to open maximized, since that's how most people will need to use it anyway, it would save you from dealing with future issues similar to this one being posted. Just a thought...

githottub avatar Aug 21 '24 16:08 githottub

This is kind of a "standard" method :smirk:

There is a reason why the main() function for Windows GUI applications is defined as:

int WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nShowCmd);

Note the nShowCmd parameter that is passed to the applications main() function from the system!

https://learn.microsoft.com/en-us/windows/win32/api/winbase/nf-winbase-winmain

lordmulder avatar Aug 28 '24 20:08 lordmulder