Visual Basic Webbrowser control does not show all elements of a page - visual-studio

Using VS 2010 -- and later VS Community 2015 -- I've been trying to make a simple Windows client app that will cycle through a list of URLs and display them in the web browser control. Specifically, it's a list of my favorite online comic strips. However, whether it's in the VS 2010 environment or the VS Community 2015 environment, the web browser control does not display all of the elements on the page. Nor will they show if I run the executable outside the development environment.
For example, at this URL, which is the Zits comic website, most of the page shows, but not the comic strip itself. At another, it shows the strip but everything on the page beneath the strip is blank. Odd, though, is that the elements appear to be there, just not visible. Running the mouse over an anchor element, for example, changes the cursor to a hand, and clicking the invisible link works.
I've looked at the source code for the pages, the code shows the elements to be there. I can't see anything in the source that shows why it wouldn't be showing up.
As I said, it does the same thing for VS 2010 and VS 2015.
Can anyone see what I'm doing wrong?

Figured it out. It's a crappy way of having to do it, but it turns out the web browser defaults to IE7 mode, and as far as I can find, the only way to correct it is to add a registry key to set the emulation to IE11.
https://msdn.microsoft.com/en-us/library/ee330730(v=vs.85).aspx
Seems like the web browser control, especially in VS 2015, would be a little more flexible than that. But it is what it is, and since this is for my own personal use, I don't have to worry about changing any registry keys in another user's machine.

Related

Offline documentation accesses Internet for trivial topics

Visual Studio (currently I am on VS2019) comes with the option to download the offline documentation and make use of that by default.
First one would have to make sure the Help Viewer is installed (from Visual Studio Installer) and then make that the default:
Then one can pick the help content downloaded for offline use:
It looks like this:
As you can see, except for a handful of topics I have installed most of the help content for offline use.
However, regularly when I use the offline help, I end up with links opening in my browser for no apparent reason. What's worse: more often than not you end up on some generic URL rather than something directly related to your search item.
Concrete example: in the Index or Contents look for IFileOperation. It should look something like this (as indicated by the colors, some of the related links were visited before):
When you click on the (highlighted) "Methods" link the Help Viewer directs to the default browser and opens the URL https://learn.microsoft.com/en-us/. This also happens to be the exact URL given if you look at the link properties for "Methods". Rather unhelpful.
Question: is there a way to use the offline help of Visual Studio completely offline even though the machine may be online? I.e. is it possible to prevent https://-URLs from opening altogether?

Visual Studio Team Explorer Extension

I am trying to create an extension for Team Explorer window in VS2017.
I want to put another button on the changes screen, or even hook into the commit method, so that I can take the comments, and integrate with a Kanbanize board.
It seems like it should be possible to but a button onto the Team Explorer window, but there doesn't seem to be any documentation I can find, or examples.
I have looked around and can only really find this link below, which I tried but doesn't seem to work, but isn't really what I am wanting to do.
https://hamidshahid.blogspot.com/2017/09/extending-team-explorer-in-vs2017.html
The Team Explorer extensibility is designed to enable adding new sections to an existing page, but altering the existing sections to change their UI/behavior is not allowed. Given this design constraint, you can add your own UI, but it'll need to be in a separate section. You should be able to read the selection data from other sections on the Git Changes page via IChangesExt.
Hope this helps.

Associate web page with project in Visual Studio

Is there any way to associate a web page with a project in Visual Studio, and have it load up in the IDE? For example, I have a project who's task list is maintained on a web site. It would be ideal to see those tasks within the IDE instead of a separate page. I can accomplish that now by following these steps:
Press Ctrl-Alt-R to open a Web Browser page
Change the URL to my desired path
Position the page as desired (like in its own tab group, off to the right of my code)
It would be nice to have a link somewhere in my project that I could click and open this page in the IDE without changing the URL every time. I have several different projects that would benefit from this. Any ideas?
Something like this happens with Visual Studio Team Foundation Server. The various documents and guidance associated with your current Team Project area accessible from within Visual Studio, in the Team Explorer window.
You can also create a Guidance Package to apply various commands and pieces of documentation at appropriate places within your projects. see Guidance Automation Extensions and Guidance Automation Toolkit.
Nice idea. The only thing that I can think of is via Visual Studio Extensibility. Basically,
Define an MSBuild property in the project file or a custom field in the solution file that has the project url.
Write a VS package that subscribes to the solution load event or something similar (I am not familiar with VS object model but I am sure there is an event like that) and looks for that custom field and extracts the url if it exists in the solution or the project file and then opens a web browser within VS that points to that url.
Here's my quick hack around this problem:
Create a text file in the project. I called my "notes.txt", and I use it to store notes, ideas, etc. that don't have a home elsewhere in the project.
Add the web link to the top of the file.
Open the text file in the IDE and put it in a new tab group. I put mine in a vertical tab group off to the right.
Drag the separator as far over as it will go to "hide" the tab group. This way it's always open and available but not taking up much space.
When you want the web page, "show" the tab group (i.e. drag the separator back) and ctrl-click the link.
This has the added benefit of opening the web page in the same tab group as the text file, so you can push them both aside when not using them.
I'm sure there's more that could be done by writing packages as others have suggested, but this was a low-effort way to get me close enough to what I wanted. I'd love to hear other suggestions or modifications that might make this setup better.

How to remove paths from tabs in Visual Studio 2008?

Is there a way to stop the path showing in a source code tab in Visual Studio 2008?
Currently when developing an ASP.NET site, I get the path from the root plus the filename - truncated when it gets too long. So something like:
MyDir/MyPage.aspx
for a short path and filename, or:
MyDir/MyLong...yPage.aspx
for a longer path and filename.
I'd prefer to see just the filename (ie just MyPage.aspx), allowing more tabs to show at once and making it easier to see which files I have open without using the drop-down list or Crtl-Tab to show the full set.
In VS2005, I just get the filename - no path however long it is. Oddly in VS2003 I get the path and filename. I've scoured the options and I can't find a setting that lets me change what appears in the tabs. Searching suggests that other people have similar issues (although which version it occurs in appears to differ) but no-one could identify an option to change what appears.
Can anyone point me in the right direction to get rid of the paths in the tabs (or confirm that it can't be changed to save me wasting more time searching)?
Tabs Studio add-in can remove path from tab in Visual Studio 2008.
See
Removing path from tab name
blog post for the example screenshots.
In my copy of VS 2008 I just get the filename, not the path. I wonder whether it's a "web site" vs "web application" thing. Which one are you working in? Can you create a project of the other type and see if it still happens? (I'm working in a web application where I get filename-only.)
It looks like Microsoft does not allow to do it using the standard method. I'm know ReSharper allows this, but installing a big plugin for this is a bad idea. I think I have sinse found a small plugin which allows show or hide the full path. I am sure this should exist.

Debugging asp.net with firefox and visual studio.net - very slow compared to IE

Debugging asp.net websites/web projects in visual studio.net 2005 with Firefox is loads slower
than using IE.
I've read something somewhere that there is a way of fixing this but i can't for the life of me find it again.
Does anyone know what i'm on about and can point me in the right direction please?
Cheers
John
edit
sorry rob i haven't explained myself very well(again). I prefer Firefox for debugging (firebug etc)
hitting F5 when debugging with IE the browser launches really quickly and clicking around my web application is almost instant and when a breakpont is hit i get to my code straight away with no delays.
hitting F5 when debugging with FireFox the browser launches really slowly (ok i have plugins that slow FF loading) but clicking around my web application is really really slow and when a breakpoint is hit it takes ages to break into code.
i swear i've read something somewhere that there is a setting in Firefox (about:config maybe?) that when changed to some magic setting sorts all this out.
bingo. found the article i read before.
i just changed my network.dns.ipv4OnlyDomains property in about:config to localhost. restarted firefox and now firefox performs the same as IE when debugging asp.net with visual studio (2005).
hope this helps anyone else that has the same problem.
"Alternative solution". Do the following in Firefox
about:config in the address bar
set network.dns.disableIPv6 to true.
Are you serious? One of the main reasons I stick to Firefox is because its so much nicer to develop with..
The live source update is awesome (view source > change code > rebuild > F5 in source)...
What is actually "slow".. I mean, the some browsers tend to be slower at rendering, but I dont see how it affects your debug time? As soon as the request is made, and your breakpoint is hit in the code, it stops?
For quick debugging try this..
Add Debugger.Break() into your code at an appropriate place.
Browse to the page in firefox (via localhost) if on local dev machine? and the Visual Studio Just in Time debugger should pop up.. select the currently open instance of Visual Studio and you can step into the code where every you want without having to start from the beginning or jumping to cursor.
-- Lee

Resources