Microsoft KB Archive/136669

= BUG: Grid Activation Causes Form to Move If Form Title Hidden =

Article ID: 136669

Article Last Modified on 5/7/2003

-

APPLIES TO


 * Microsoft Visual FoxPro 3.0 Standard Edition
 * Microsoft Visual FoxPro 3.0b Standard Edition
 * Microsoft Visual FoxPro 5.0 Standard Edition
 * Microsoft Visual FoxPro 5.0a
 * Microsoft Visual FoxPro 6.0 Professional Edition

-



This article was previously published under Q136669



SYMPTOMS
Many people set the Top property of a form to a negative number so they can hide the form's title bar. However, if you have a grid on a form and the Top property of the form is set to a negative number, the grid gets the focus and the Top property is reset to zero. This causes the form to move, which is not desired behavior.



WORKAROUND
Instead of using a negative Top property to hide the title bar, set the following form properties, which will hide the title bar without using a negative Top property setting. Caption=       && Leave it empty ControlBox=.F.  Closable=.F.   MaxButton=.F.   MinButton=.F.   Movable=.F.   Top=0           && Or anything more than 0



STATUS
Microsoft has confirmed this to be a problem in the Microsoft products listed at the beginning of this article. We are researching this problem and will post new information here in the Microsoft Knowledge Base as it becomes available.



Steps to Reproduce Problem
  Type the following command in the Command window: CREATE FORM test  Add any table to the data environment. Add a text box to the form. Drag the title bar of the table onto the form so that you create a grid. Set the Top property of the Form to -20. Run the form. As long as the text box is the active control, the form title bar remains off screen. However, if you press TAB to move to the grid, the form moves to Top=0, and you can see the title bar.</li></ol>

Additional query words: kbvfp300 kbvfp500 kbvfp600

Keywords: kbbug kbui KB136669

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.