Partager via


Windows Explorer Preview Pane for .vb files

I love using the Preview Pane in Windows Explorer to quickly preview file contents:

image

Usually, to enable this preview for a file extension I just open regedit, go to HKEY_CLASSES_ROOT –> .xxx (where xxx is the extension you’re interested in), and add a string key called PerceivedType with value of “text”: https://blog.wpfwonderland.com/2011/01/15/customize-windows-7-preview-pane-for-xaml-files/

However for some reason it didn’t work for .vb files. After some web searching, one solution I found that worked for me is to add the preview handler GUID explicitly under a “shellex” key: https://www.howtogeek.com/howto/windows-vista/make-windows-vista-explorer-preview-pane-work-for-more-file-types/

image

Windows Registry Editor Version 5.00

[HKEY_CLASSES_ROOT\.vb\shellex\{8895b1c6-b41f-4c1c-a562-0d564250836f}]
@="{1531d583-8375-4d3f-b5fb-d23bbd169f22}"

Comments

  • Anonymous
    May 29, 2012
    Of course, this is very useful for code files...

  • Anonymous
    May 30, 2012
    You should figure out how to get this to call to a roslyn based dll that will let you get syntax highlighting for vb/cs files in the preview too :)

  • Anonymous
    May 30, 2012
    Absolutely :) One day... Did you know that Stephen Toub has written a lot about Preview Handlers? msdn.microsoft.com/.../cc163487.aspx

  • Anonymous
    November 04, 2014
    Thanks, this was exactly what I needed to get my .json files to show up as text in the preview pane! Simplest method I could find. Thanks so muc