<?xml version='1.0' encoding='UTF-8'?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/'><id>tag:blogger.com,1999:blog-3063041321490551014</id><updated>2008-06-16T10:48:35.132+01:00</updated><title type='text'>igence and software</title><link rel='alternate' type='text/html' href='http://igence.com/blogs/software/'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3063041321490551014/posts/default'/><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://igence.com/blogs/software/atom.xml'/><author><name>admin</name><uri>http://www.blogger.com/profile/16962302922476094077</uri><email>noreply@blogger.com</email></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>2</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-3063041321490551014.post-6677261025979143215</id><published>2008-06-16T10:32:00.004+01:00</published><updated>2008-06-16T10:48:35.162+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ShellExecute'/><category scheme='http://www.blogger.com/atom/ns#' term='context sensitive help'/><category scheme='http://www.blogger.com/atom/ns#' term='Windows'/><category scheme='http://www.blogger.com/atom/ns#' term='HTML'/><title type='text'>Fun with ShellExecute</title><content type='html'>To provide context sensitive help for an application, it is quite useful to have HTML pages available which can be opened by the application when the user presses a key. To make things simple, it's also nice to have named anchors within the HTML so that the application doesn't need a separate page for each help item.&lt;br /&gt;&lt;br /&gt;The obvious way to do this is to put the HTML files in a folder somewhere and use the Windows &lt;a href="http://msdn.microsoft.com/en-us/library/bb762153(VS.85).aspx"&gt;ShellExecute&lt;/a&gt; command to open the browser with the specified URL. If the pages can be fetched from a HTTP server, then there is no problem using named anchors, but if your pages are just files in a folder, you need to use the &lt;em&gt;file:&lt;/em&gt; protocol. However, the &lt;em&gt;file:&lt;/em&gt; protocol requires absolute paths, which means you need to know where your folder is. On top of that, you can't use named anchors either.&lt;br /&gt;&lt;br /&gt;The solution I found is to get the application to create a temporary HTML file,  on the fly,  containing a meta refresh tag, which redirects to the URL (with the named anchor) you need. eg.&lt;br /&gt;&lt;br /&gt;&lt;code&gt;&lt;br /&gt;&amp;lt;meta HTTP-EQUIV="REFRESH" content="0; url=Help\Pages\Index.htm#subsection"&amp;gt;&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;You then use &lt;em&gt;ShellExecute&lt;/em&gt; to open the temporary file instead. If the temporary file has the extension &lt;em&gt;.htm&lt;/em&gt; you don't need to specify the protocol because it uses the extension to determine that the file should be opened in the browser.&lt;br /&gt;&lt;br /&gt;This means you can use a relative path &lt;strong&gt;and&lt;/strong&gt; a named anchor.</content><link rel='alternate' type='text/html' href='http://igence.com/blogs/software/2008/06/fun-with-shellexecute.html' title='Fun with ShellExecute'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3063041321490551014&amp;postID=6677261025979143215' title='0 Comments'/><link rel='replies' type='application/atom+xml' href='http://igence.com/blogs/software/atom.xml' title='Post Comments'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3063041321490551014/posts/default/6677261025979143215'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3063041321490551014/posts/default/6677261025979143215'/><author><name>Nige</name><uri>http://www.blogger.com/profile/18357503840062883891</uri><email>noreply@blogger.com</email></author></entry><entry><id>tag:blogger.com,1999:blog-3063041321490551014.post-7342656003318774347</id><published>2008-04-15T16:14:00.002+01:00</published><updated>2008-04-15T16:18:34.904+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='VisualStudio'/><title type='text'>Visual Studio Output Window</title><content type='html'>Ever have problems with your output window in Visual Studio? Sometimes I find that mine won't automatically scroll when building - I have to keep dragging the scrollbar to get the most recent output into view.&lt;br /&gt;&lt;br /&gt;It's not immediately obvious, but It turns out that the cursor needs to be at the end of the output for it to keep the most recent output in the window. A quick Ctrl-End will get the cursor to the end of the output.</content><link rel='alternate' type='text/html' href='http://igence.com/blogs/software/2008/04/visual-studio-output-window.html' title='Visual Studio Output Window'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3063041321490551014&amp;postID=7342656003318774347' title='1 Comments'/><link rel='replies' type='application/atom+xml' href='http://igence.com/blogs/software/atom.xml' title='Post Comments'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3063041321490551014/posts/default/7342656003318774347'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3063041321490551014/posts/default/7342656003318774347'/><author><name>Steve</name><uri>http://www.blogger.com/profile/07477505979996266975</uri><email>noreply@blogger.com</email></author></entry></feed>