The information in this article applies to:
SYMPTOMSOne or more of the tabs on the SSTAB control is missing its controls when displayed at run-time. CAUSEThe SSTab control does not respond correctly when attempting to manipulate the Tab or TabVisible properties from the Form-Load event. If the SSTab control has not completely finished initializing when you attempt to set the Tab property to reflect a value different than the default, then the controls are still located in their temporary holding area at -72960. The Tab will display without its controls. To guarantee that the SSTab control has finished initializing, you can access its properties from any event after Form_Load has completed and the SSTab can receive the focus. This will occasionally work from the Form_Load event but has inconsistent behavior when you have various controls on one the tabs. RESOLUTIONTab PropertyIf you attempt to set a certain tab as the current tab on initial display, then setting the Tab property in either the Form_Activate event or the SSTab1.Got_Focus event instead of the Form_Load event fixes this problem, as follows:
TabVisible PropertyIf you attempt to display only a certain tab on initial display, then setting the desired tab as the current tab and then setting the REMAINING tabs TabVisible property to false in reverse order (leaving the current tab set to visible) from either the Form_Activate event or the SSTab.Got_Focus events solves this problem, as follows:
This code assumes that have stored an entry "MyTab" in the registry. The GetSetting function can be replaced with a module level Public integer variable and set as needed.
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 Studio
97 Service Pack 2.
Q170365 : INFO: Visual Studio 97 Service Packs - What, Where, and Why For a list of the Visual Basic 5.0 bugs that were fixed in the Visual Studio 97 Service Pack 2, please see the following article in the Microsoft Knowledge Base: Q171554 : INFO: Visual Basic 5.0 Fixes in Visual Studio 97 Service Pack 2 MORE INFORMATIONActivate & Got_FocusIf you do not want the tab selected every time the SSTab control or the form its on receives focus, then use a Static flag such as bReactivate in the sample. If you do want the tab to be set every time the form receives focus, then remove the flag:
Steps to Reproduce BehaviorSSTab ControlTab property:
REFERENCES
For more information, please see the following article in the Microsoft
Knowledge Base:
Q149328 : Selecting Invisible Tab Can Cause GPF with SSTab Control Additional query words: missing invisible kbVBp500fix kbVBp kbWinOS98 kbDSupport kbdse kbVBp400fix
Keywords : kbGrpVBDB |
Last Reviewed: January 5, 2000 © 2000 Microsoft Corporation. All rights reserved. Terms of Use. |