Click here to Skip to main content
15,921,454 members
Please Sign up or sign in to vote.
4.00/5 (4 votes)
See more:
This is a really weird bug, never come across anything like this before.

When you go to File >> Open in the release build of my program, it shows the Open Dialog sized to fill the entire screen. It's not maximized as there is no maximize or restore button - just sized to the screen.

The open dialog is resized to exactly fill whichever screen the program is running on (using it with dual monitors).

It has what looks like a sizing border and when you hover the mouse over it you get the <-> type arrow which usually means you can resize it - but it won't resize. Also if you click and drag on the caption (which in Windows 7 usually works even with maximized windows) - you can't drag it onto the other screen. It is just fixed in position until you dismiss it.

THIS DEPENDS ONLY ON THE NAME OF THE EXECUTABLE FILE

If I rename the release build to some other name the open dialog works fine as it always did.

It is also retrospective - affects all my previous builds of the program which never had this issue before.

EVEN AFFECTS OTHER PROGRAMS WHEN RENAMED TO SAME NAME AS MY PROGRAM

Also - most mysterious of all - even affects other programs by other software authors as well.

I tried renaming notepad++ for instance to "Bounce Metronome.exe" and it also shows the Open dialog maximized - and reverts to normal behaviour when you rename the .exe file to some other name.

I am using Windows 7, and I have Norton AV installed on the computer (in case it is relevant).

Tried it on another computer, with the latest build, and it behaves normally. And had no error reports from my users about this.

So - seems to be some peculiarity of my computer setup - but what - and what causes it? Anyone know what it is?

Obviously I can work around it by just giving my program another name when using it on this computer - but - want to understand what is going on.

I don't even know how to show an Open dialog like this if I wanted to.

BTW for what it is worth, the dialog is created using OPENFILENAME structure and the GetOpenFileName routine
http://msdn.microsoft.com/en-us/library/windows/desktop/ms646927(v=vs.85).aspx[^]

Has anyone seen anything like this before?

Robert
Posted
Updated 23-Oct-19 14:21pm
v2

Check this registry path:

HKEY_CURRENT_USER
   Software
      Microsoft
         Windows
            CurrentVersion
               Explorer
                  Comdlg32


You will find the SubKey called CIDSizeMRU. There will be a lot of entries (one per application). They are REG_BINARY entries. You will need to open each one of them and locate one that has the name of your exe. Delete it and it all start to work.
 
Share this answer
 
Comments
Robert Inventor 18-Oct-12 18:42pm    
I'm impressed :). That solved it. I just deleted them all as I had 100 of them and don't care about Windows 7 forgetting where some of the open dialogs were when last shown.

Any thoughts about why it might have happened? Occasionally I have had to do a hard reboot when Windows stopped responding, wonder if that might be the reason...

Anyway 5 stars for your solution :)
chaau 18-Oct-12 18:50pm    
it could happen very easily. Sometimes when click on "Show Desktop" icon in Windows, all the windows get minimised, even those with the popups. If you start clicking on the minimised windows in the taskbar, and if you are fast enough in clicking, the windows re-open in some bizarre way (maximised, or full screen). That's probably what happened
chaau 18-Oct-12 18:52pm    
Also, do not forget Alt-Space + X combination. It does some magic things
Robert Inventor 18-Oct-12 20:52pm    
Thanks again, great, it's good to understand how it happened.

I use Windows key + D quite often to show the desktop, so expect it is something to do with that. Haven't used Alt + Space + X to maximize before, that's a new one for me (though do use Alt + space to move a window if it gets accidentally placed outside the monitor, anyway that hasn't happened for some time either) - so it's probably the Windows + D.
Press Windows Key and left arrow. This will reset it to half the screen from where you can resize it in the normal way.
 
Share this answer
 
Comments
OriginalGriff 24-Jan-19 6:57am    
Tom, It's a good idea to check the status of a question before you answer - this one is seven years old, and was marked as "Solved" on the day it was posted.

Posting answers to old questions - particularly solved ones - looks a lot like "rep point farming" which is counted as abuse, and that can get you thrown off the site. Especially if one of our more "trigger happy" members spots it before I do!
I'd recommend sticking to recent questions in future.
CPallini 24-Jan-19 7:18am    
"trigger happy"
Have you been in my Country, lately? :-D
lamewater 29-May-24 3:21am    
Thanks a lot. Created this account just to thank you.
Tom Robson has the better solution. People should not be directed to edit registry values if they don't have to. I had the exact same problem and windows + down arrow did the trick for me.

Also created an account just to upvote the windows + arrow solution. Not rep point farming.
 
Share this answer
 
Comments
Richard Deeming 22-Nov-21 10:20am    
"Not rep point farming"

Says the throwaway account posting a comment as a new "solution" to a solved question from nine years ago. 🤦‍♂️
CHill60 22-Nov-21 10:21am    
If you had upvoted Tom Robson's solution then this might not be getting the downvotes. It would have been better to post this as a comment

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900