Custom Windows 7 Preview Pane syntax highlighting - windows-7

After discovering on superuser that there is no current way to add syntax highlighting to the Windows 7 preview pane, I figured if someone else hasn't done it yet then I'll go ahead and do it myself.
Is there an API or SDK available for Windows 7 that exposes the preview pane in explorer to customization? If so, what is it and how do you think is the most elegant way to accomplish this? I would like it to read the syntax highlighting options from Visual Studio to get the users favorite colors and code theme settings.

You must check the Preview Handler, you can download an example from here.
The Preview Handler is used to display a file preview inside the Windows Explorer preview pane or other preview handler hosts.
You can check these links :
IPreviewHandler Interface
View Data Your Way With Our Managed Preview Handler Framework
Using Vista Preview Handlers in WPF application

Related

Webbrowser control no longer working after Windows Update

I have a custom project in VB6, which I was working with it since 3-4 years ago, now today suddenly I noticed that Webbrowser controls are not working anymore on my laptop (maybe after a windows automatic update - it's working on my other laptop)
The problem is when I double-click on Webbrowser components there are no default declarations for them and this text shows up in code section:
Private Sub WebBrowser1_SHDocVwCtl(ByVal Text As String)
End Sub
Please help me fix it and get it back to how it was before.
As #JimmySmith suggests, check that Microsoft Internet Controls is checked in your Components list (Project > Components > Controls tab > Microsoft Internet Controls.). If not, check it and hit Apply, then OK.
If it doesn't show up in the list, you can use the Browse button to look for C:\Windows\SysWOW64\ieframe.dll directly.
Other things that I recommend:
Run VB6 IDE as Administrator. Right-click on your Microsoft Visual Basic 6.0 shortcut and check "Run this program as an administrator" in compatibility properties section.
Select Windows XP (Service pack 3) as Compatibility mode.

Change Ctrl+Click Behavior in VS Output Window

Is there a way to change how links are opened from the Output Window (not an Editor)?
Meaning, when the Output Windows detects a link, it's Ctrl+Click-able and opens in an Internet Explorer tab.
I'd like to change the target from IE to the Text Editor and still within Visual Studio.
There are solutions for changing the click behavior in an Editor, but I am asking specifically about the Output Window. I understand the answer might just be no.
There's a Visual Studio Extension that lets you open URIs in the browser (https://visualstudiogallery.msdn.microsoft.com/46c0c49e-f825-454b-9f6a-48b216797eb5).
I've forked it and made some updates so that it will handle file:/// URIs as well, opening them in the Visual Studio editor or an external editor. I've published a debug version that hasn't been very heavily tested here. You can peruse the full source of my fork here, or the original source here.
This makes debugging/working with the BizTalk map/schema tools a lot better...

How to show / unhide Web Essential bar from chrome?

I've checked autohide and the bar disappeared but now how can I see it again?
It's enough to press CTRL from inside Chrome.
To see the Web Essentials menu in Chrome when using Visual Studio 2015:
Ensure you've installed Web Essentials 2015 - https://visualstudiogallery.msdn.microsoft.com/ee6e6d8c-c837-41fb-886a-6b50ae2d06a2
Click the 'View in Browser' button in Visual Studio to view your site:
The Web Essentials menu will appear as an overlay at the bottom of your web page
Press CTRL in Chrome to toggle the Web Essentials menu on or off
CTRL works inside of Internet explorer as well.
Note that you have to have BrowserLink enabled. Otherwise Ctrl doesn't do anything.
Note, this feature is no longer available in Visual Studio 2017 update 3 as the author, madskristensen states:
It was removed for several reasons.
It interfered too much with the DOM of the running page
It didn't work when the various features were split out into their own extension
I build this Chrome extension to replace it
Link to image of evidence is below.(Not enough rep to show image on post)
Author of web essentials explaining why the tool bar is not suitable for the browser
Link to issue on github
There is a WebEssentials2015-Settings.json file which contains default settings for web essentials (e.g. for VS2015 it is \AppData\Roaming\Microsoft\VisualStudio\14.0\WebEssentials2015-Settings.json).
After I clicked autohide the only way for me to bring the web essentials menu back in the browsers was to edit this file setting the ShowMenu to true ("ShowMenu": true). That fixed the issue for me.
One note though, this file seems to be read on VS startup so you may need to restart VS to see the difference. Also these settings can be separately set for each solution (Web Essentials > Create solution settings). This option creates the .json file specific for given solution.

Multi monitor support in Visual Studio 2010

I hear that Visual Studio 2010 has "Multi-Monitor Support". Yet now that I am using it, I see no difference from VS2008.
I still have to resize all my windows when switching from one monitor to two and back again.
Is there somekind of Profile or setting I am missing? For example, Delphi lets you save desktop profiles that record where you like specific windows. Switching from single to dual monitors is as simple as selecting a different desktop profile.
Is there something similar in VS2010 that I am missing?
Multi-monitor support refers to the ability for you to undock a code window and drag it to another monitor. Try dragging on the tab of a code window into your other monitor.
ScottGu has an excellent blog post on this subject
http://weblogs.asp.net/scottgu/archive/2009/08/31/multi-monitor-support-vs-2010-and-net-4-series.aspx
Just drag the editor tabs out and onto your other monitor and witness the glory.
In VS2008 you could detach things like the solution explorer and put them onto a different monitor, but source code pages were forced to stay on one monitor.

Undocking a code window in Visual Studio

I've finally joined the 21st century and got a second monitor. I can merrily undock all the side windows (Solution Explorer, ToolBox etc) and plonk them anywhere I like on either monitor. I can't though figure out how to undock a code window. Is it possible? (I'm using vs2008).
Multi monitor is a key functionality of the new vs 2010 as was requested by a lot of devs.
Actually there is a way to do that.
You just need to install a FREE addon from Exact Magic named StudioTools
It has this feature called "Tear Off Editor Window".
You just activate the tab you want to tear off and from the StudioTools manu select Tear Off Editor.
I also strongly recommend you check out the rest of the features, especially the "Smart Goto" which rocks!
Just for you (VS2010) ;-p
You could resize Visual Studio to cover both monitors, then right-click the code window and click New Vertical Tab Group
The "Tear Off Editor Window" feature in Studio Tools from Exact Magic is I think the only option if can't just extend the application over your monitors, if you have multiple monitors of different sizes or a mix of portrait and landscape orientation.
However you cannot download Studio Tools from the original site as they were bought by another company who no longer support the software. You can download it from the the Wayback Machine: Studio Tools Download Link

Resources