'Disappearing text in Visual studio 2019

I am using Visual Studio 16.2.3 and since yesterday text has disappeared from some of the Visual Studio dialogs. For example text from the properties window and text in the Watch dialog.

Any idea what can cause this?

properties



Solution 1:[1]

Double buffering will cause this problem. Look for "YOUR_TEXT_BOX" in the second sub for solution if DB is root cause.

Private Sub launchsub_Flicker_Killer(cnlTarget As Control)
       Call launchsub__Flicker_Set_Buffer(cnlTarget)
       If cnlTarget.Controls.Count > 0 Then
           For Each myControl As Control In cnlTarget.Controls
               Call launchsub_Flicker_Killer(myControl)
           Next
       End If
   End Sub

Private Sub launchsub__Flicker_Set_Buffer(cnlWhat As Control)
       Dim type As Type = cnlWhat.[GetType]()
       If type.Equals(YOUR_TEXT_BOX.[GetType]()) Then
           Exit Sub
       End If
       Dim param As Object() = {ControlStyles.AllPaintingInWmPaint Or ControlStyles.UserPaint Or ControlStyles.DoubleBuffer, True}
       Dim flags As BindingFlags = BindingFlags.NonPublic Or BindingFlags.Instance
       Dim method As MethodInfo = type.GetMethod("SetStyle", flags)       ' Prevent flickering
       Try
           If method IsNot Nothing Then
               method.Invoke(cnlWhat, param)
           End If
       Catch exb As Exception
           MessageBox.Show("Ref 666 in Drawing.DoubleBuffer)
           End
       End Try
   End Sub

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Jeremy Caney