BUG: Controls on Sheridan Tab Adopt Large Negative Left Value

Last reviewed: June 25, 1996
Article ID: Q152692
The information in this article applies to:
  • Professional, and Enterprise Editions of Microsoft Visual Basic, 16-bit only, for Windows, version 4.0

SYMPTOMS

If a control is placed on a Sheridan tab control, and if focus is set to a different tab, and then the control is set to a different position, the result may be that the control takes on a large negative Left value after focus again switches to a different tab. Setting the Left property back to a reasonable positive value may cause two instances of the control to appear on different tabs of the control.

WORKAROUND

The only workaround is to design one tab at a time. Before moving to design a different tab, the controls on the original tab should be placed at their final location.

If the problem described above does occur, the only option is to reset the Left property of the controls in the Visual Basic Properties window to reasonable positive values, and then delete any unwanted instances of the control that were created on other tabs.

When the controls have been placed at a desirable position, it is worth keeping a backup of the Form file on which the tab is placed. That way if the problem of large negative values in the Left property does occur, the original Top and Left properties can be restored by reading the backup Form file.

STATUS

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

MORE INFORMATION

Steps To Reproduce the Problem

  1. Start a new project in Visual Basic. Form1 is created by default.

  2. Make Form1 large, so it fills most of the screen. This problem only seems to surface on large forms, and typically where the video resolution is 800x600 (or greater) pixels.

  3. Place a Sheridan tab control on Form1, and set the size so it fills most of Form1.

  4. Place a Command button on the upper-left corner of Tab 0.

  5. Click Tab 1 to set focus.

  6. Click Tab 0 to set focus.

  7. Move the Command button from the upper-left corner to the upper-right corner of Tab 0.

  8. Click on Tab 1 to set focus, and then click on Tab 0 to set focus.

At this point the Command button is missing. By selecting the Properties window, and viewing the Left property of the Command button you can see that it is set to a large negative value. Switching the Left property to a positive value (e.g. 100) causes the Command button to reappear on Tab 0. However, the Command button also appears on Tab 1.


Additional reference words: 4.00 vb4win vb416
KBCategory: kbprg kbbuglist
KBSubcategory: PrgCtrlsCus




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: June 25, 1996
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.