Microsoft KB Archive/185218

{|
 * width="100%"|

FIX: Controls in Frame Shifted Down When Form Has Menu

 * }

Q185218

-

The information in this article applies to:


 * Microsoft Windows CE Toolkit for Visual Basic 5.0, version 1.0

-

SYMPTOMS
In a Windows CE Toolkit for Visual Basic 5.0 (VBCE) project, when a form has a menu, controls placed within a frame on that form are shifted down within the frame at run time.

RESOLUTION
Avoid using menus and frames on the same form. If a frame is desired for visual appearance only, use lines to simulate a frame.

STATUS
Microsoft has confirmed this to be a problem in the Microsoft products that are listed at the beginning of this article.

This problem was corrected in Windows CE Toolkit for Visual Basic 6.00.

Steps to Reproduce Behavior

 * 1) Create a new VBCE project in Visual Basic. Form1 is created by default.
 * 2) On Form1 add a Frame (Frame1) in the middle of the Form. In Frame1, add a TextBox or a CommandButton.
 * 3) Add a TextBox or a CommandButton to Form1 outside of Frame1, but at the same horizontal position as the control within the Frame.
 * 4) Run the project in emulation; notice that the control within Frame1 remains at the same horizontal position as the control outside Frame1.
 * 5) Add a simple menu to Form1 by using the Menu Editor on the Tools menu.
 * 6) Run the project in emulation again. Notice that the control within Frame1 is shifted down from its original position, although Frame1 itself remains in its designed position.

NOTE: Although the controls in the Frame are shifted down visually on the Form, their Top properties remain the same values set at design-time.