Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How workaround windows-10 webbrowser shellfolderview scrolling Bug?

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

On windows 10 there is a Display-Bug, after reordering the content, when the selected Item moves from bottom to top.

Let's reproduce:

  1. Start a clean winform or wpf Solution
  2. drag the WebBrowser-Control inside
  3. add Code to navigate to your custom Folder e.g:

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

  4. start application, switch to Details-View if needed (with right click - context-menu) WebBrowser Control showing local folder in DetailView

  5. Sort by Name-Column, Select first Entry

  6. Sort by Name-Column to move item to end

selected item is scrolled to bottom

  1. Sort by Name-Column again to move selected item to top

showing scrollbar, window and list are not in sync

You'll see, scrollbar, window and list are not in sync. The Scrollbar moved up, but the Item didn't move to the first position in the list. Also the item is only visible after Mouse-Over. Also dragging the scroll-bar a little, doesn't heal this misbehavior.

Does anybody has an idea how to overcome this? I was thinking of forcing the shellfolderview to redraw by calling InvalidateRect or sending a WM_PAINT Message to the hooked SysListView32, but with no success.

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

How to solve this?

like image 743
gReX Avatar asked Nov 19 '22 00:11

gReX


1 Answers

This Windows-Bug is present at least in Windows-10-Version 1703 15063.674 and 15063.850. (Creators Update)

Other Issues with this Version are reported 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 Fall Creators Update the Bug is gone. I tested with 1709 Build 16299.125

@Gaurange Dave could not reproduce the bug with Anniversary Update. He tested with Build 14393.1944.

So just update Windows 10. Thanks everybody for help.

like image 130
gReX Avatar answered Dec 01 '22 00:12

gReX