tag:blogger.com,1999:blog-30630413214905510142009-04-23T21:09:22.491+01:00igence and softwareOur views, opinions and top tips on software developmentadminhttp://www.blogger.com/profile/16962302922476094077noreply@blogger.comBlogger3125tag:blogger.com,1999:blog-3063041321490551014.post-21918028162615944302008-09-10T10:43:00.004+01:002008-09-26T09:50:22.584+01:00We have a winner!Congratulations to our very own Charles Bailey who won the Code Critique competition in the August edition of {CVU}, the magazine of the <a href="http://accu.org/">ACCU</a>.<br /><br />You'll have to join the ACCU to read Charles' critique, however it's thoroughly recommend if you wish to join a community of developers who care about programming and want to keep in touch with what's going on.<div class="blogger-post-footer"><img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3063041321490551014-2191802816261594430?l=igence.com%2Fblogs%2Fsoftware'/></div>Stevehttp://www.blogger.com/profile/07477505979996266975noreply@blogger.com0tag:blogger.com,1999:blog-3063041321490551014.post-66772610259791432152008-06-16T10:32:00.004+01:002008-06-16T10:48:35.162+01:00Fun with ShellExecuteTo 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.<br /><br />The obvious way to do this is to put the HTML files in a folder somewhere and use the Windows <a href="http://msdn.microsoft.com/en-us/library/bb762153(VS.85).aspx">ShellExecute</a> 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 <em>file:</em> protocol. However, the <em>file:</em> 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.<br /><br />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.<br /><br /><code><br />&lt;meta HTTP-EQUIV="REFRESH" content="0; url=Help\Pages\Index.htm#subsection"&gt;<br /></code><br /><br />You then use <em>ShellExecute</em> to open the temporary file instead. If the temporary file has the extension <em>.htm</em> you don't need to specify the protocol because it uses the extension to determine that the file should be opened in the browser.<br /><br />This means you can use a relative path <strong>and</strong> a named anchor.<div class="blogger-post-footer"><img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3063041321490551014-6677261025979143215?l=igence.com%2Fblogs%2Fsoftware'/></div>Nigehttp://www.blogger.com/profile/18357503840062883891noreply@blogger.com0tag:blogger.com,1999:blog-3063041321490551014.post-73426560033187743472008-04-15T16:14:00.002+01:002008-04-15T16:18:34.904+01:00Visual Studio Output WindowEver 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.<br /><br />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.<div class="blogger-post-footer"><img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3063041321490551014-7342656003318774347?l=igence.com%2Fblogs%2Fsoftware'/></div>Stevehttp://www.blogger.com/profile/07477505979996266975noreply@blogger.com1