Microsoft KB Archive/279739

From BetaArchive Wiki
< Microsoft KB Archive
Revision as of 17:28, 18 July 2020 by 3155ffGd (talk | contribs) (importing KB archive)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Knowledge Base


Article ID: 279739

Article Last Modified on 8/15/2005



APPLIES TO

  • Microsoft Visual Studio 6.0 Enterprise Edition
  • Microsoft Visual Basic 6.0 Professional Edition
  • Microsoft Visual Basic 6.0 Enterprise Edition



This article was previously published under Q279739

SYMPTOMS

Switching tabs (setting the Tab property) of an SSTab control inside a loop may cause the Desktop and all of its children to be repainted (that is, all the windows appear to flicker).

STATUS

This bug has been fixed in Visual Studio (Visual Basic) 6.0 Service Pack 5, which can be downloaded from the following Microsoft Web site at:

MORE INFORMATION

Steps to Reproduce Behavior

  1. Create a Standard EXE project in Visual Basic. Form1 is created by default.
  2. On the Project menu, click to select Components, and then add Microsoft Tabbed Dialog Control 6.0.
  3. Add a Timer and an SSTab control to Form1.
  4. Add the following code in Form1's code pane:

    Private Sub Form_Load()
        With Timer1
            .Enabled = True
            .Interval = 1000
        End With
    End Sub
    
    Private Sub Timer1_Timer()
        Dim i As Integer
        For i = 0 To 2
            SSTab1.Tab = i
            'DoEvents
        Next i
    End Sub
                        
  5. Press the F5 key to run the program, and note that the Desktop and its child windows flicker each time the timer event fires.
  6. Stop the program and uncomment the DoEvents line inside Timer1_Timer.
  7. Run the program, and note that the Desktop and its child windows no longer flicker.
  8. Minimize Form1, and note that the Desktop and its child windows flicker again.

NOTE: The fix only applies to the scenario when the form is minimized. Therefore, the workaround (using DoEvents) in the preceding example is still needed.

Keywords: kbbug kbfix kbvs600sp5fix kbqfe KB279739