rubberduck-vba / Rubberduck

Every programmer needs a rubberduck. COM add-in for the VBA & VB6 IDE (VBE).
https://rubberduckvba.com
GNU General Public License v3.0
1.91k stars 299 forks source link

Code Inspection Window opens partially off-screen #5854

Open RSquared64 opened 3 years ago

RSquared64 commented 3 years ago

Rubberduck version information

Version 2.5.2.5958
OS: Microsoft Windows NT 10.0.19043.0, x64
Host Product: Microsoft Office x64
Host Version: 16.0.14430.20088
Host Executable: MSACCESS.EXE

Description Every time the Code Inspection window opens, the title bar is off the screen, top of the screen. I am currently running 3 1920 x 1080 screens if that helps.

Please note, resizing the window just a bit forces a redraw of the window and corrects the issue. It's just an added step that's a bit of PITA.

To Reproduce Open the Code Inspection window.

Expected behavior Title bar should be visible and able to be used to move the window around.

BenediktCromind commented 3 years ago

I tried to reproduce this. I have the same monitor setup as @RSquared64. Here is my version information:

Version 2.5.2.5958 OS: Microsoft Windows NT 10.0.19043.0, x64 Host Product: Microsoft Office x64 Host Version: 16.0.13801.20864 Host Executable: EXCEL.EXE

This is how my window looks like: image

I don't have the behaviour that the window is off-screen but I have resize to useful dimensions in order to use it.

MDoerner commented 3 years ago

Both these issues come up from time to time. The general cause is that something went wrong with the VBE's handling of our windows.

Handling the position is entirely done by the VBE. It also persists where a window was open last and tries to use that information to open windows in consistent places. Unfortunately, something seems to go wrong between the VBE and our windows sometimes, leading to very inconvenient window positions.

In this case, what you should be able to do is to activate the window, then use Alt + Space followed by either m or the down arrow and Enter to switch to keyboard positioning. Then you can move the window using the arrow keys.

The strange size is another problem in the interaction with the VBE. We usually try to set the initial window size to a sensible minimum size. Unfortunately, the VBE tends to sometimes send entirely useless window size messages, leaving us without information about the window size. To better handle that we would have to get a better understanding of the VBE's inner window management. So, for now, if the VBE decides to size the window oddly and not to communicate proper sizes, we will end up with these tiny windows.

Vogel612 commented 3 years ago

This makes me remember the ages old docking bug that sometimes caused a crash when the VBE was sending values that were incorrectly converted to a negative value... Maybe there is some way to correctly deal with these window sizes that also fixes this issue.