A static menu bar occupies the top line of the screen and is visible to the user even when it's not being accessed. The top line of the screen is unavailable to your program while a static menu is displayed.
The second line of the screen becomes line 1 to your program. Thus, the effective screen height is reduced by one line when you display a static menu bar.
When you initially display a static menu bar, the screen is scrolled down one line to make room for it. If this causes your current window to extend past the bottom edge of the screen, the window is truncated at the bottom edge.
When you remove a static menu bar, the screen is scrolled up one line so that line 1 of your program is on the top edge of the screen. If your current window extends to the bottom edge of the screen, it has one line added to it, so that it still extends to the bottom edge after the move.