How does windows-10 webbrowser shellfolderview workaround scroll error?

I use WebBrowser-Control to view the contents of a folder.

Windows 10 displays โ€œDisplay Errorโ€ after reordering the content when the selected item moves from bottom to top.

Let me reproduce:

  • Run a clean winform or wpf Solution.
  • drag the webbrowser control inside
  • add code to go to your user folder, for example:

    public Form1() { InitializeComponent(); webBrowser1.Navigate(@"C:\tmp\yourfolder\"); }

  • launch the application, switch to Details-View, if necessary (using the right-click context menu) Web browser control showing local folder in DetailView

  • Sort by column name, select first record

  • Sort by column name to move the object to the end

the selected item scrolls down

  1. Sort by column name again to move the selected item up

showing scrollbar, window and list not in sync

You will see that the scroll bar, window and list are not in sync. The scroll bar has moved up, but the item has not moved to the first position in the list. Also, the item is displayed only after Mouse-Over. Also, by dragging the scroll bar a little, it does not heal this abnormal behavior.

Does anyone have any ideas how to overcome this? I was thinking about getting the shellfolderview to redraw by calling InvalidateRect or sending a WM_PAINT message to the connected SysListView32, but without success.

And yes, I want to show a list with details - View: -).

How to solve this?

+5
source share
1 answer

This Windows error is present in at least Windows 10 versions 1703 15063.674 and 15063.850. (Update for authors)

Other problems with this version are provided here: https://answers.microsoft.com/en-us/windows/forum/windows_10-security/important-syslistview32-bug-with-multiple-items/9e6198f7-a38a-4614-bc89- 4781a9bde748? Tm = 1509985739913 & auth = 1

In the Fall Creators Update, the error disappeared. I tested with 1709 Build 16299.125

@Gaurange Dave could not reproduce the Anniversary update bug. He tested using build 14393.1944.

So, just upgrade Windows 10. Thanks to everyone for their help.

0
source

Source: https://habr.com/ru/post/1274271/


All Articles