FIX: Controls on Sheridan Tab Adopt Large Negative Left Value

ID: Q152692


The information in this article applies to:
  • Microsoft Visual Basic Professional and Enterprise Editions, 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.


RESOLUTION

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 a bug in the Microsoft products listed at the beginning of this article. This bug has been fixed in Visual Basic 5.0.


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 query words: kbVBp400bug kbVBp500fix kbVBp kbdsd kbDSupport kbCtrl

Keywords : kbCtrl kbVBp400bug kbVBp500fix kbGrpVB
Version :
Platform : WINDOWS
Issue type : kbbug


Last Reviewed: January 5, 2000
© 2000 Microsoft Corporation. All rights reserved. Terms of Use.