PRB: Listbox Not Properly Redrawn in Design Mode

Last reviewed: April 4, 1996
Article ID: Q129906
The information in this article applies to:
  • Microsoft Visual FoxPro for Windows, version 3.0

SYMPTOMS

When a list box is resized in Design Mode, black boxes that correspond to the handles are left on the Form. This occurs when the list is resized in a program (for example, when you are coding a Builder). The list is properly refreshed when you resize it in the Form Designer.

CAUSE

When modifying the size of an object outside the Form Designer, Visual FoxPro does not automatically manage the position of the handles in the corners. However a new function, SYS(104), has been included in the product. It switches the handles ON and OFF at design time.

STATUS

This behavior is by design.

RESOLUTION

If you are developing a builder or a wizard that accesses objects outside of the Form Designer at design time, use the SYS(104) function to toggle the grippers on and off. For example, type the following when you are ready to move the control:

   ? SYS(104)

Use the SYS(104) function in the same fashion when you are ready to redraw the handles after the control has been repositioned.

MORE INFORMATION

Steps to Reproduce Behavior

  1. Create a Form.

  2. Place a list box on the form. Leave the focus on the list box.

  3. From the Command window, type the following code:

    nSelect=ASELECT(atest) && Places list object reference into an array.

       ?SYS(104)              && Handles are toggled off.
       Atest(1).Top=Atest(1).top+45 && moves the list 45 pixels down
       ? SYS(104)             && Handles are toggled on.
       Atest(1).Top=Atest(1).Top+45  &&List is moved and leaves black marks.
    


Additional reference words: 3.00 vFoxwin
KBCategory: kbtool kbcode kbprb
KBSubcategory: FxtoolFormdes


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: April 4, 1996
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.