<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-3207635837318812689</id><updated>2011-07-07T22:08:23.364-07:00</updated><title type='text'>Barnes Blog - Tech</title><subtitle type='html'></subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://mterictech.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3207635837318812689/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://mterictech.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Eric</name><uri>http://www.blogger.com/profile/13588476673993737491</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='33' height='27' src='http://bp3.blogger.com/_x4CqcCRkboc/R2CjmpbnxYI/AAAAAAAAAQk/4AGRdY5ATgY/S220/eric.jpg'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>14</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-3207635837318812689.post-8704581659674300685</id><published>2010-06-30T09:23:00.000-07:00</published><updated>2010-06-30T09:37:26.004-07:00</updated><title type='text'>Code Snippet Shortcut</title><content type='html'>Note to self: to quickly insert a code snippet in Visual Studio, just type the name of the snippet and hit the tab key. This is much easier than hunting through the multi-nested context menus to find the snippet. ;)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3207635837318812689-8704581659674300685?l=mterictech.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mterictech.blogspot.com/feeds/8704581659674300685/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://mterictech.blogspot.com/2010/06/code-snippet-shortcut.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3207635837318812689/posts/default/8704581659674300685'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3207635837318812689/posts/default/8704581659674300685'/><link rel='alternate' type='text/html' href='http://mterictech.blogspot.com/2010/06/code-snippet-shortcut.html' title='Code Snippet Shortcut'/><author><name>Eric</name><uri>http://www.blogger.com/profile/13588476673993737491</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='33' height='27' src='http://bp3.blogger.com/_x4CqcCRkboc/R2CjmpbnxYI/AAAAAAAAAQk/4AGRdY5ATgY/S220/eric.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3207635837318812689.post-7927095912012274907</id><published>2010-03-24T15:04:00.001-07:00</published><updated>2010-03-25T09:26:54.036-07:00</updated><title type='text'>Markup/Code Behind Switcher</title><content type='html'>I can't live without this macro. I literally use it hundreds of times a day. The code below, once added to a macro in Visual Studio and assigned a hot key, allows me to quickly switch from markup to code behind, or vice versa, regardless of the current file I am viewing.&lt;br /&gt;&lt;pre style="font-size: 12px"&gt;&lt;br /&gt;&lt;font color="blue"&gt;Sub&amp;nbsp;&lt;/font&gt;&lt;font color="black"&gt;SwitchToMarkup&lt;/font&gt;&lt;font color="gray"&gt;()&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/font&gt;&lt;font color="blue"&gt;Dim&amp;nbsp;&lt;/font&gt;&lt;font color="black"&gt;fileName&amp;nbsp;&lt;/font&gt;&lt;font color="blue"&gt;As&amp;nbsp;String&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;Dim&amp;nbsp;&lt;/font&gt;&lt;font color="black"&gt;docName&amp;nbsp;&lt;/font&gt;&lt;font color="blue"&gt;As&amp;nbsp;String&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;Dim&amp;nbsp;&lt;/font&gt;&lt;font color="black"&gt;docFullName&amp;nbsp;&lt;/font&gt;&lt;font color="blue"&gt;As&amp;nbsp;String&lt;br&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/font&gt;&lt;font color="black"&gt;docName&amp;nbsp;&lt;/font&gt;&lt;font color="blue"&gt;=&amp;nbsp;&lt;/font&gt;&lt;font color="black"&gt;DTE.ActiveWindow.Document.&lt;/font&gt;&lt;font color="black"&gt;Name&lt;/font&gt;&lt;font color="black"&gt;.ToLower&lt;/font&gt;&lt;font color="gray"&gt;()&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/font&gt;&lt;font color="black"&gt;docFullName&amp;nbsp;&lt;/font&gt;&lt;font color="blue"&gt;=&amp;nbsp;&lt;/font&gt;&lt;font color="black"&gt;DTE.ActiveWindow.Document.FullName.ToLower&lt;/font&gt;&lt;font color="gray"&gt;()&lt;br&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/font&gt;&lt;font color="blue"&gt;If&amp;nbsp;&lt;/font&gt;&lt;font color="gray"&gt;(&lt;/font&gt;&lt;font color="black"&gt;docName.EndsWith&lt;/font&gt;&lt;font color="gray"&gt;(&lt;/font&gt;&lt;font color="darkred"&gt;&amp;quot;.cs&amp;quot;&lt;/font&gt;&lt;font color="gray"&gt;))&amp;nbsp;&lt;/font&gt;&lt;font color="blue"&gt;Then&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/font&gt;&lt;font color="black"&gt;fileName&amp;nbsp;&lt;/font&gt;&lt;font color="blue"&gt;=&amp;nbsp;&lt;/font&gt;&lt;font color="black"&gt;docFullName.Replace&lt;/font&gt;&lt;font color="gray"&gt;(&lt;/font&gt;&lt;font color="darkred"&gt;&amp;quot;.cs&amp;quot;&lt;/font&gt;&lt;font color="gray"&gt;,&amp;nbsp;&lt;/font&gt;&lt;font color="darkred"&gt;&amp;quot;&amp;quot;&lt;/font&gt;&lt;font color="gray"&gt;)&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/font&gt;&lt;font color="black"&gt;ElseIf&amp;nbsp;&lt;/font&gt;&lt;font color="gray"&gt;(&lt;/font&gt;&lt;font color="black"&gt;docName.EndsWith&lt;/font&gt;&lt;font color="gray"&gt;(&lt;/font&gt;&lt;font color="darkred"&gt;&amp;quot;.aspx&amp;quot;&lt;/font&gt;&lt;font color="gray"&gt;))&amp;nbsp;&lt;/font&gt;&lt;font color="blue"&gt;Then&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/font&gt;&lt;font color="black"&gt;fileName&amp;nbsp;&lt;/font&gt;&lt;font color="blue"&gt;=&amp;nbsp;&lt;/font&gt;&lt;font color="black"&gt;docFullName.Replace&lt;/font&gt;&lt;font color="gray"&gt;(&lt;/font&gt;&lt;font color="darkred"&gt;&amp;quot;.aspx&amp;quot;&lt;/font&gt;&lt;font color="gray"&gt;,&amp;nbsp;&lt;/font&gt;&lt;font color="darkred"&gt;&amp;quot;.aspx.cs&amp;quot;&lt;/font&gt;&lt;font color="gray"&gt;)&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/font&gt;&lt;font color="black"&gt;ElseIf&amp;nbsp;&lt;/font&gt;&lt;font color="gray"&gt;(&lt;/font&gt;&lt;font color="black"&gt;docName.EndsWith&lt;/font&gt;&lt;font color="gray"&gt;(&lt;/font&gt;&lt;font color="darkred"&gt;&amp;quot;.ascx&amp;quot;&lt;/font&gt;&lt;font color="gray"&gt;))&amp;nbsp;&lt;/font&gt;&lt;font color="blue"&gt;Then&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/font&gt;&lt;font color="black"&gt;fileName&amp;nbsp;&lt;/font&gt;&lt;font color="blue"&gt;=&amp;nbsp;&lt;/font&gt;&lt;font color="black"&gt;docFullName.Replace&lt;/font&gt;&lt;font color="gray"&gt;(&lt;/font&gt;&lt;font color="darkred"&gt;&amp;quot;.ascx&amp;quot;&lt;/font&gt;&lt;font color="gray"&gt;,&amp;nbsp;&lt;/font&gt;&lt;font color="darkred"&gt;&amp;quot;.ascx.cs&amp;quot;&lt;/font&gt;&lt;font color="gray"&gt;)&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/font&gt;&lt;font color="black"&gt;ElseIf&amp;nbsp;&lt;/font&gt;&lt;font color="gray"&gt;(&lt;/font&gt;&lt;font color="black"&gt;docName.EndsWith&lt;/font&gt;&lt;font color="gray"&gt;(&lt;/font&gt;&lt;font color="darkred"&gt;&amp;quot;.master&amp;quot;&lt;/font&gt;&lt;font color="gray"&gt;))&amp;nbsp;&lt;/font&gt;&lt;font color="blue"&gt;Then&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/font&gt;&lt;font color="black"&gt;fileName&amp;nbsp;&lt;/font&gt;&lt;font color="blue"&gt;=&amp;nbsp;&lt;/font&gt;&lt;font color="black"&gt;docFullName.Replace&lt;/font&gt;&lt;font color="gray"&gt;(&lt;/font&gt;&lt;font color="darkred"&gt;&amp;quot;.master&amp;quot;&lt;/font&gt;&lt;font color="gray"&gt;,&amp;nbsp;&lt;/font&gt;&lt;font color="darkred"&gt;&amp;quot;.master.cs&amp;quot;&lt;/font&gt;&lt;font color="gray"&gt;)&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/font&gt;&lt;font color="blue"&gt;End&amp;nbsp;If&lt;br&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;If&amp;nbsp;&lt;/font&gt;&lt;font color="gray"&gt;(&lt;/font&gt;&lt;font color="black"&gt;fileName.Length&lt;/font&gt;&lt;font color="gray"&gt;()&amp;nbsp;&amp;gt;&amp;nbsp;&lt;/font&gt;&lt;font color="black"&gt;0&lt;/font&gt;&lt;font color="gray"&gt;)&amp;nbsp;&lt;/font&gt;&lt;font color="blue"&gt;Then&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;If&amp;nbsp;&lt;/font&gt;&lt;font color="black"&gt;System.IO.File.Exists&lt;/font&gt;&lt;font color="gray"&gt;(&lt;/font&gt;&lt;font color="black"&gt;fileName&lt;/font&gt;&lt;font color="gray"&gt;)&amp;nbsp;&lt;/font&gt;&lt;font color="blue"&gt;Then&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/font&gt;&lt;font color="black"&gt;DTE.ItemOperations.OpenFile&lt;/font&gt;&lt;font color="gray"&gt;(&lt;/font&gt;&lt;font color="black"&gt;fileName&lt;/font&gt;&lt;font color="gray"&gt;)&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/font&gt;&lt;font color="blue"&gt;End&amp;nbsp;If&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;End&amp;nbsp;If&lt;br /&gt;End&amp;nbsp;Sub&lt;br /&gt;&lt;br&gt;&lt;/font&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3207635837318812689-7927095912012274907?l=mterictech.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mterictech.blogspot.com/feeds/7927095912012274907/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://mterictech.blogspot.com/2010/03/markupcode-behind-switcher.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3207635837318812689/posts/default/7927095912012274907'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3207635837318812689/posts/default/7927095912012274907'/><link rel='alternate' type='text/html' href='http://mterictech.blogspot.com/2010/03/markupcode-behind-switcher.html' title='Markup/Code Behind Switcher'/><author><name>Eric</name><uri>http://www.blogger.com/profile/13588476673993737491</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='33' height='27' src='http://bp3.blogger.com/_x4CqcCRkboc/R2CjmpbnxYI/AAAAAAAAAQk/4AGRdY5ATgY/S220/eric.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3207635837318812689.post-2327693795237592197</id><published>2009-10-21T10:19:00.000-07:00</published><updated>2009-11-18T12:22:02.382-08:00</updated><title type='text'>Long Lost Friend Found: SelectCurrentWord</title><content type='html'>In versions previous to Visual Studio 2008, there was a keystroke that I used all the time: CTRL + W. This selected the current word that your cursor was on in the code. However, once I upgraded to Visual Studio 2008, they remapped that keystroke. After a lot of Google searching, I finally stumbled upon the new keystroke: SHIFT + CTRL + W! &lt;br /&gt;&lt;br /&gt;I feel like I've found my long, lost friend.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3207635837318812689-2327693795237592197?l=mterictech.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mterictech.blogspot.com/feeds/2327693795237592197/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://mterictech.blogspot.com/2009/10/long-lost-friend-found.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3207635837318812689/posts/default/2327693795237592197'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3207635837318812689/posts/default/2327693795237592197'/><link rel='alternate' type='text/html' href='http://mterictech.blogspot.com/2009/10/long-lost-friend-found.html' title='Long Lost Friend Found: SelectCurrentWord'/><author><name>Eric</name><uri>http://www.blogger.com/profile/13588476673993737491</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='33' height='27' src='http://bp3.blogger.com/_x4CqcCRkboc/R2CjmpbnxYI/AAAAAAAAAQk/4AGRdY5ATgY/S220/eric.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3207635837318812689.post-5385331056683336680</id><published>2009-04-07T15:05:00.000-07:00</published><updated>2009-11-18T12:27:53.483-08:00</updated><title type='text'>IE8 Compatibility View Icon Proposal</title><content type='html'>I can never tell if the compatibility view button in Internet Explorer 8 is activated or not. Therefore, I propose this newly designed icon to make it more clear. What do you think, Microsoft?&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_x4CqcCRkboc/SwRYtPio3zI/AAAAAAAAAZ8/2__kPC_v27c/s1600/P1010219e.jpg"&gt;&lt;img style="float:left; margin:0 10px 10px 0;cursor:pointer; cursor:hand;width: 400px; height: 238px;" src="http://3.bp.blogspot.com/_x4CqcCRkboc/SwRYtPio3zI/AAAAAAAAAZ8/2__kPC_v27c/s400/P1010219e.jpg" border="0" alt=""id="BLOGGER_PHOTO_ID_5405542987040612146" /&gt;&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3207635837318812689-5385331056683336680?l=mterictech.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mterictech.blogspot.com/feeds/5385331056683336680/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://mterictech.blogspot.com/2009/11/ie8-compatibility-view-icon-proposal.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3207635837318812689/posts/default/5385331056683336680'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3207635837318812689/posts/default/5385331056683336680'/><link rel='alternate' type='text/html' href='http://mterictech.blogspot.com/2009/11/ie8-compatibility-view-icon-proposal.html' title='IE8 Compatibility View Icon Proposal'/><author><name>Eric</name><uri>http://www.blogger.com/profile/13588476673993737491</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='33' height='27' src='http://bp3.blogger.com/_x4CqcCRkboc/R2CjmpbnxYI/AAAAAAAAAQk/4AGRdY5ATgY/S220/eric.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/_x4CqcCRkboc/SwRYtPio3zI/AAAAAAAAAZ8/2__kPC_v27c/s72-c/P1010219e.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3207635837318812689.post-1704051294933326283</id><published>2009-03-11T15:46:00.000-07:00</published><updated>2009-11-18T12:32:01.469-08:00</updated><title type='text'>Cleaning Visual Studio Recent Projects</title><content type='html'>If you have ever changed the path of a Visual Studio project, you have probably discovered that a broken link remains in the "Recent Projects" section on the start page. If you click the broken link, Visual Studio informs you that the project is missing and asks if you would like to remove it from the list. This works fine for one project, but if you have moved several projects, the Recent Projects list becomes polluted with broken links.&lt;br /&gt;&lt;br /&gt;I wanted to find a way to clean up that list, so that only valid projects were displayed. Fortunately, there is a way--by using the good, ol' registry.&lt;br /&gt;&lt;br /&gt;The project links are stored under this path in the registry: (the 8.0 part may be different depending on your version of Visual Studio):&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-family: courier new;"&gt;HKCU\Software\Microsoft\VisualStudio\8.0\ProjectMRUList&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;If you navigate to this path in regedit, you can manage the list. I ended up just deleting all of the entries to give me a clean slate. After doing that, when I loaded up Visual Studio, the Recent Projects list was cleared. I was then able to open each project manually, which repopulates the list with the correct project paths. You could also modify the paths for each entry, but I was too lazy for that. ;)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3207635837318812689-1704051294933326283?l=mterictech.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mterictech.blogspot.com/feeds/1704051294933326283/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://mterictech.blogspot.com/2009/03/cleaning-visual-studio-recent-projects.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3207635837318812689/posts/default/1704051294933326283'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3207635837318812689/posts/default/1704051294933326283'/><link rel='alternate' type='text/html' href='http://mterictech.blogspot.com/2009/03/cleaning-visual-studio-recent-projects.html' title='Cleaning Visual Studio Recent Projects'/><author><name>Eric</name><uri>http://www.blogger.com/profile/13588476673993737491</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='33' height='27' src='http://bp3.blogger.com/_x4CqcCRkboc/R2CjmpbnxYI/AAAAAAAAAQk/4AGRdY5ATgY/S220/eric.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3207635837318812689.post-1462149818989851279</id><published>2009-02-03T15:26:00.000-08:00</published><updated>2009-11-18T12:35:08.238-08:00</updated><title type='text'>MeasureIt Firefox Plug-in</title><content type='html'>One thing I love about Firefox is the broad range of available developer-friendly plug-ins. The other day, a co-worker of mine told me about &lt;a href="http://www.kevinfreitas.net/extensions/measureit/"&gt;MeasureIt&lt;/a&gt;, a handy plug-in that allows you to measure sizes of things on a web page, similar in concept to the IE Developer Toolbar's ruler. &lt;br /&gt;&lt;br /&gt;Once installed, the plug-in displays at the bottom of your browser:&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_x4CqcCRkboc/SwRaGAm6H1I/AAAAAAAAAaE/rCqU6H1N3fY/s1600/MeasureIt.jpg"&gt;&lt;img style="margin:0 10px 10px 0;cursor:pointer; cursor:hand;width: 123px; height: 64px;" src="http://1.bp.blogspot.com/_x4CqcCRkboc/SwRaGAm6H1I/AAAAAAAAAaE/rCqU6H1N3fY/s400/MeasureIt.jpg" border="0" alt=""id="BLOGGER_PHOTO_ID_5405544512040345426" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;When you click on it, the current page you are viewing fades and you are given a cross-hair cursor. You can then click and drag a rectangle to measure heights and widths right on the page.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_x4CqcCRkboc/SwRaMVtkMxI/AAAAAAAAAaM/UdnUIXAq04k/s1600/MeasureItInAction.jpg"&gt;&lt;img style="margin:0 10px 10px 0;cursor:pointer; cursor:hand;width: 352px; height: 237px;" src="http://4.bp.blogspot.com/_x4CqcCRkboc/SwRaMVtkMxI/AAAAAAAAAaM/UdnUIXAq04k/s400/MeasureItInAction.jpg" border="0" alt=""id="BLOGGER_PHOTO_ID_5405544620784628498" /&gt;&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3207635837318812689-1462149818989851279?l=mterictech.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mterictech.blogspot.com/feeds/1462149818989851279/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://mterictech.blogspot.com/2009/02/measureit-firefox-plug-in.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3207635837318812689/posts/default/1462149818989851279'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3207635837318812689/posts/default/1462149818989851279'/><link rel='alternate' type='text/html' href='http://mterictech.blogspot.com/2009/02/measureit-firefox-plug-in.html' title='MeasureIt Firefox Plug-in'/><author><name>Eric</name><uri>http://www.blogger.com/profile/13588476673993737491</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='33' height='27' src='http://bp3.blogger.com/_x4CqcCRkboc/R2CjmpbnxYI/AAAAAAAAAQk/4AGRdY5ATgY/S220/eric.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/_x4CqcCRkboc/SwRaGAm6H1I/AAAAAAAAAaE/rCqU6H1N3fY/s72-c/MeasureIt.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3207635837318812689.post-1978590038856737007</id><published>2008-12-16T15:18:00.000-08:00</published><updated>2009-11-18T12:37:31.807-08:00</updated><title type='text'>Typedef in C#</title><content type='html'>Note to self (and to anyone else interested):&lt;br /&gt;&lt;br /&gt;A typedef in C++, such as&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-family: courier new;"&gt;typedef short SmallNumber; // C++&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;can be translated in C# as&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: courier new;font-size:85%;" &gt;using SmallNumber = System.Int16; // C#&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;This example is trivial, but it's very handy to be able to create an alias for long type names, especially when you start getting into generics.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3207635837318812689-1978590038856737007?l=mterictech.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mterictech.blogspot.com/feeds/1978590038856737007/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://mterictech.blogspot.com/2008/12/typedef-in-c.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3207635837318812689/posts/default/1978590038856737007'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3207635837318812689/posts/default/1978590038856737007'/><link rel='alternate' type='text/html' href='http://mterictech.blogspot.com/2008/12/typedef-in-c.html' title='Typedef in C#'/><author><name>Eric</name><uri>http://www.blogger.com/profile/13588476673993737491</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='33' height='27' src='http://bp3.blogger.com/_x4CqcCRkboc/R2CjmpbnxYI/AAAAAAAAAQk/4AGRdY5ATgY/S220/eric.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3207635837318812689.post-4982037835820213000</id><published>2008-12-15T14:45:00.000-08:00</published><updated>2009-11-18T12:39:15.724-08:00</updated><title type='text'>Quickly Adding Regions in C#</title><content type='html'>I've gotten myself into the habit of adding regions to the code in my C# files because it helps me organize the content better. Up until now, I have been typing the region tags manually, which isn't that much typing, but it is enough to be slightly annoying. Fortunately, there are a few shortcuts to help out.&lt;br /&gt;&lt;br /&gt;If you are starting fresh and want to create a region with nothing inside, you can type #region and then press the tab key. This automatically adds the #endregion and allows you to add a region name.&lt;br /&gt;&lt;br /&gt;If you want to surround existing code with a region, you can use Visual Studio's built-in region code snippet. Here's one way to do it:&lt;br /&gt;&lt;br /&gt;1. Highlight the code you wish to wrap in regions.&lt;br /&gt;2. Press Ctrl-K, Ctrl-X.&lt;br /&gt;3. Select 'Visual C#' from the pop-up menu.&lt;br /&gt;4. Select #region.&lt;br /&gt;&lt;br /&gt;That is getting a little bit long, so recording a macro and assigning it a keyboard shortcut might be the way to go.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3207635837318812689-4982037835820213000?l=mterictech.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mterictech.blogspot.com/feeds/4982037835820213000/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://mterictech.blogspot.com/2008/12/quickly-adding-regions-in-c.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3207635837318812689/posts/default/4982037835820213000'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3207635837318812689/posts/default/4982037835820213000'/><link rel='alternate' type='text/html' href='http://mterictech.blogspot.com/2008/12/quickly-adding-regions-in-c.html' title='Quickly Adding Regions in C#'/><author><name>Eric</name><uri>http://www.blogger.com/profile/13588476673993737491</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='33' height='27' src='http://bp3.blogger.com/_x4CqcCRkboc/R2CjmpbnxYI/AAAAAAAAAQk/4AGRdY5ATgY/S220/eric.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3207635837318812689.post-8416507068093070068</id><published>2008-12-10T18:00:00.000-08:00</published><updated>2009-11-18T12:40:13.019-08:00</updated><title type='text'>C# Drag-and-Drop</title><content type='html'>Just a quick entry to post a &lt;a href="http://dzaebel.net/DataGridViewDragDrop.htm"&gt;link&lt;/a&gt; I found the other day of a code example for implementing drag-and-drop functionality in a DataGridView object. I originally used it for the DataGridView and then expanded it to other controls as well. It works pretty slick without much coding. (The example code is written with good English comments, despite the German text at the top of the page. Fear not. :))&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3207635837318812689-8416507068093070068?l=mterictech.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mterictech.blogspot.com/feeds/8416507068093070068/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://mterictech.blogspot.com/2008/12/c-drag-and-drop.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3207635837318812689/posts/default/8416507068093070068'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3207635837318812689/posts/default/8416507068093070068'/><link rel='alternate' type='text/html' href='http://mterictech.blogspot.com/2008/12/c-drag-and-drop.html' title='C# Drag-and-Drop'/><author><name>Eric</name><uri>http://www.blogger.com/profile/13588476673993737491</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='33' height='27' src='http://bp3.blogger.com/_x4CqcCRkboc/R2CjmpbnxYI/AAAAAAAAAQk/4AGRdY5ATgY/S220/eric.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3207635837318812689.post-6734529549964633097</id><published>2008-12-09T15:25:00.000-08:00</published><updated>2009-11-18T12:42:27.943-08:00</updated><title type='text'>Concise Array Definitions in C#</title><content type='html'>A co-worker told me about this typing-saver for creating a string array and defining the elements inside the array. Before I was doing the classic way:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-family: courier new;"&gt;string[] numberArray = new string[] { "one", "two", "three" };&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;However, you don't need to specify the new string array at all! The above line of code can be simplified:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-family: courier new;"&gt;string[] numberArray = { "one", "two", "three" };&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Not only does the second way save a little extra typing, but it is a lot easier to read.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3207635837318812689-6734529549964633097?l=mterictech.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mterictech.blogspot.com/feeds/6734529549964633097/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://mterictech.blogspot.com/2008/12/concise-array-definitions-in-c.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3207635837318812689/posts/default/6734529549964633097'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3207635837318812689/posts/default/6734529549964633097'/><link rel='alternate' type='text/html' href='http://mterictech.blogspot.com/2008/12/concise-array-definitions-in-c.html' title='Concise Array Definitions in C#'/><author><name>Eric</name><uri>http://www.blogger.com/profile/13588476673993737491</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='33' height='27' src='http://bp3.blogger.com/_x4CqcCRkboc/R2CjmpbnxYI/AAAAAAAAAQk/4AGRdY5ATgY/S220/eric.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3207635837318812689.post-7632815852436758102</id><published>2008-12-09T14:01:00.000-08:00</published><updated>2009-11-18T12:45:23.676-08:00</updated><title type='text'>Set PictureBox Image from a MemoryStream</title><content type='html'>Recently, I needed to set an image of a PictureBox control in a C# Windows application. The image was stored in the database as binary data. My first thought was to save the image from the database to a temporary location on the disk and then set the image using that temporary path. But, after a little bit of googling, I found a better solution. You can simply set the image from a memory stream:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-family: courier new;"&gt;byte[] imageBytes = GetImageFromDatabase(); &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;MemoryStream ms = new MemoryStream(imageBytes, false); &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;pictureBox1.Image = Image.FromStream(ms);&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;That's it! Sometimes .Net makes life so easy.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3207635837318812689-7632815852436758102?l=mterictech.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mterictech.blogspot.com/feeds/7632815852436758102/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://mterictech.blogspot.com/2008/12/set-picturebox-image-from-memorystream.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3207635837318812689/posts/default/7632815852436758102'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3207635837318812689/posts/default/7632815852436758102'/><link rel='alternate' type='text/html' href='http://mterictech.blogspot.com/2008/12/set-picturebox-image-from-memorystream.html' title='Set PictureBox Image from a MemoryStream'/><author><name>Eric</name><uri>http://www.blogger.com/profile/13588476673993737491</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='33' height='27' src='http://bp3.blogger.com/_x4CqcCRkboc/R2CjmpbnxYI/AAAAAAAAAQk/4AGRdY5ATgY/S220/eric.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3207635837318812689.post-8468404675470300057</id><published>2008-11-04T17:22:00.000-08:00</published><updated>2009-11-18T12:48:01.786-08:00</updated><title type='text'>HtmlDecode Saves the Day</title><content type='html'>I ran into an interesting HTML encoding issue on an ASP.Net site today.&lt;br /&gt;&lt;br /&gt;I was binding some data to an asp:grid control and then doing some post-processing to the data in the OnDataBoundRow event handler. One of the data cells had a "á" character in it, which ended up getting displayed like this:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-family:courier new;"&gt;&amp;#38;#225; &lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Interestingly enough, in the page source, the browser wasn't converting that to a text character because it was converting the ampersand and not the rest of the code for some reason:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-family:courier new;"&gt;&amp;#38;amp;#225;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;The fix was to use a handy .Net function in the System.Web.HttpUtility class:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-family:courier new;"&gt;text = HttpUtility.HtmlDecode(text);&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;This replaces all of the html-encoded characters with their actual text characters. After I ran the data through that function, the characters displayed correctly.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3207635837318812689-8468404675470300057?l=mterictech.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mterictech.blogspot.com/feeds/8468404675470300057/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://mterictech.blogspot.com/2008/11/htmldecode-saves-day.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3207635837318812689/posts/default/8468404675470300057'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3207635837318812689/posts/default/8468404675470300057'/><link rel='alternate' type='text/html' href='http://mterictech.blogspot.com/2008/11/htmldecode-saves-day.html' title='HtmlDecode Saves the Day'/><author><name>Eric</name><uri>http://www.blogger.com/profile/13588476673993737491</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='33' height='27' src='http://bp3.blogger.com/_x4CqcCRkboc/R2CjmpbnxYI/AAAAAAAAAQk/4AGRdY5ATgY/S220/eric.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3207635837318812689.post-5479347611762376322</id><published>2008-10-29T14:56:00.000-07:00</published><updated>2009-11-18T12:49:27.745-08:00</updated><title type='text'>Windows 7 Screenshots</title><content type='html'>I just ran across this &lt;a href="http://www.flickr.com/photos/31242879@N00/sets/72157608452379413/show"&gt;Flickr page&lt;/a&gt; containing screenshots of Microsoft's up-coming Windows 7 operating system. The UI seems to be very similar to Vista, with a few minor enhancements here and there. (For example, one screenshot shows improvements to the calculator, a program that hasn't changed in years.) But not much really appears to be new. I suspect that Windows 7 is in direct response to the &lt;a href="http://www.mojaveexperiment.com/"&gt;Mojave Experiment&lt;/a&gt;. Just change the name and people will never know the difference.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3207635837318812689-5479347611762376322?l=mterictech.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mterictech.blogspot.com/feeds/5479347611762376322/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://mterictech.blogspot.com/2008/10/windows-7-screenshots.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3207635837318812689/posts/default/5479347611762376322'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3207635837318812689/posts/default/5479347611762376322'/><link rel='alternate' type='text/html' href='http://mterictech.blogspot.com/2008/10/windows-7-screenshots.html' title='Windows 7 Screenshots'/><author><name>Eric</name><uri>http://www.blogger.com/profile/13588476673993737491</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='33' height='27' src='http://bp3.blogger.com/_x4CqcCRkboc/R2CjmpbnxYI/AAAAAAAAAQk/4AGRdY5ATgY/S220/eric.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3207635837318812689.post-7316428091261554577</id><published>2008-09-28T20:26:00.000-07:00</published><updated>2009-11-18T12:50:12.192-08:00</updated><title type='text'>IE View Source Registry Key</title><content type='html'>A co-worker told me about this handy trick. By default, Internet Explorer uses Notepad when you view the source of web page. You can change this by adding an entry to the registry. Here is how:&lt;br /&gt;&lt;br /&gt;1. Open regedit.&lt;br /&gt;2. Navigate to HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Internet Explorer.&lt;br /&gt;3. Create a new key and give it the name "View Source Editor".&lt;br /&gt;4. Under that key, create a string value called "Editor Name".&lt;br /&gt;5. As the value data, enter the full path of the program you wish to use.&lt;br /&gt;&lt;br /&gt;Goodbye Notepad!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3207635837318812689-7316428091261554577?l=mterictech.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mterictech.blogspot.com/feeds/7316428091261554577/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://mterictech.blogspot.com/2008/09/ie-view-source-registry-key.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3207635837318812689/posts/default/7316428091261554577'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3207635837318812689/posts/default/7316428091261554577'/><link rel='alternate' type='text/html' href='http://mterictech.blogspot.com/2008/09/ie-view-source-registry-key.html' title='IE View Source Registry Key'/><author><name>Eric</name><uri>http://www.blogger.com/profile/13588476673993737491</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='33' height='27' src='http://bp3.blogger.com/_x4CqcCRkboc/R2CjmpbnxYI/AAAAAAAAAQk/4AGRdY5ATgY/S220/eric.jpg'/></author><thr:total>0</thr:total></entry></feed>
