<?xml version="1.0" encoding="utf-8"?>
<rss xmlns:atom="http://www.w3.org/2005/Atom" xmlns:sy="http://purl.org/rss/1.0/modules/syndication/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
  version="2.0">
  <channel>
    <title>Mark Schmidt's Abode</title>
    <atom:link
      href="https://docs.microsoft.com/archive/blogs/markhsch/feed.xml"
      rel="self"
      type="application/rss+xml" />
    <link>https://docs.microsoft.com/archive/blogs/markhsch/feed.xml</link>
    <description>On Programming, Writing, Gaming, Fitness, Life</description>
    <lastBuildDate>Tue, 16 Apr 2019 05:18:27 GMT</lastBuildDate>
    <language>en-US</language>
    <sy:updatePeriod>hourly</sy:updatePeriod>
    <sy:updateFrequency>1</sy:updateFrequency>
    <item>
      <title>Random Number Generation using XSLT</title>
      <link>https://docs.microsoft.com/archive/blogs/markhsch/random-number-generation-using-xslt</link>
      <pubDate>Mon, 20 Apr 2009 16:40:12 GMT</pubDate>
      <dc:creator><![CDATA[Mark Schmidt-MSFT]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/markhsch/2009/04/20/random-number-generation-using-xslt/</guid>
      <description><![CDATA[Just whipped this up real quick since I needed for something and thought I’d share. If you’re using...]]></description>
      <content:encoded><![CDATA[<p>Just whipped this up real quick since I needed for something and thought I’d share. If you’re using a Microsoft based XSLT processor and have a need to generate random numbers for some purpose, here’s a quick xsl snippet to help you out.</p><pre><pre style="font-size: 12px; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; background-color: #ffffff"><span style="color: #0000ff">&lt;?</span>xml version="1.0"<span style="color: #0000ff">?&gt;</span>
</pre><pre style="font-size: 12px; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; background-color: #ffffff"><span style="color: #0000ff">&lt;</span><span style="color: #c71585">xsl</span>:<span style="color: #800000">stylesheet</span> <span style="color: #ff0000">version</span>=<span style="color: #0000ff">"1.0"</span> <span style="color: #ff0000">xmlns</span>:<span style="color: #ff0000">xsl</span>=<span style="color: #0000ff">"http://www.w3.org/1999/XSL/Transform"</span> 
</pre><pre style="font-size: 12px; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; background-color: #ffffff">    <span style="color: #ff0000">xmlns</span>:<span style="color: #ff0000">msxml</span>=<span style="color: #0000ff">"urn:schemas-microsoft-com:xslt"</span> 
</pre><pre style="font-size: 12px; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; background-color: #ffffff">    <span style="color: #ff0000">xmlns</span>:<span style="color: #ff0000">random</span>=<span style="color: #0000ff">"http://www.microsoft.com/msxsl"</span> 
</pre><pre style="font-size: 12px; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; background-color: #ffffff">    <span style="color: #ff0000">exclude</span>-<span style="color: #ff0000">result</span>-<span style="color: #ff0000">prefixes</span>=<span style="color: #0000ff">"msxml random"</span><span style="color: #0000ff">&gt;</span>
</pre><pre style="font-size: 12px; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; background-color: #ffffff">    
</pre><pre style="font-size: 12px; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; background-color: #ffffff">    <span style="color: #0000ff">&lt;</span><span style="color: #c71585">xsl</span>:<span style="color: #800000">output</span> <span style="color: #ff0000">method</span>=<span style="color: #0000ff">"text"</span><span style="color: #0000ff">/&gt;</span>
</pre><pre style="font-size: 12px; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; background-color: #ffffff"></pre><pre style="font-size: 12px; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; background-color: #ffffff">    <span style="color: #0000ff">&lt;</span><span style="color: #c71585">msxml</span>:<span style="color: #800000">script</span> <span style="color: #ff0000">implements</span>-<span style="color: #ff0000">prefix</span>=<span style="color: #0000ff">"random"</span><span style="color: #0000ff">&gt;</span>
</pre><pre style="font-size: 12px; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; background-color: #ffffff">        function range(min, max) 
</pre><pre style="font-size: 12px; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; background-color: #ffffff">        { 
</pre><pre style="font-size: 12px; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; background-color: #ffffff">            var dist = max - min + 1;
</pre><pre style="font-size: 12px; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; background-color: #ffffff">            return Math.floor(Math.random() * dist + min);
</pre><pre style="font-size: 12px; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; background-color: #ffffff">        }
</pre><pre style="font-size: 12px; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; background-color: #ffffff">    <span style="color: #0000ff">&lt;/</span><span style="color: #c71585">msxml</span>:<span style="color: #800000">script</span><span style="color: #0000ff">&gt;</span>
</pre><pre style="font-size: 12px; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; background-color: #ffffff"></pre><pre style="font-size: 12px; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; background-color: #ffffff">    <span style="color: #0000ff">&lt;</span><span style="color: #c71585">xsl</span>:<span style="color: #800000">template</span> <span style="color: #ff0000">match</span>=<span style="color: #0000ff">"/"</span><span style="color: #0000ff">&gt;</span>
</pre><pre style="font-size: 12px; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; background-color: #ffffff">        <span style="color: #0000ff">&lt;</span><span style="color: #c71585">xsl</span>:<span style="color: #800000">call</span>-<span style="color: #ff0000">template</span> <span style="color: #ff0000">name</span>=<span style="color: #0000ff">"GenerateRandomNumbers"</span><span style="color: #0000ff">&gt;</span>
</pre><pre style="font-size: 12px; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; background-color: #ffffff">            <span style="color: #0000ff">&lt;</span><span style="color: #c71585">xsl</span>:<span style="color: #800000">with</span>-<span style="color: #ff0000">param</span> <span style="color: #ff0000">name</span>=<span style="color: #0000ff">"count"</span><span style="color: #0000ff">&gt;</span>200<span style="color: #0000ff">&lt;/</span><span style="color: #c71585">xsl</span>:<span style="color: #800000">with</span>-param<span style="color: #0000ff">&gt;</span>
</pre><pre style="font-size: 12px; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; background-color: #ffffff">        <span style="color: #0000ff">&lt;/</span><span style="color: #c71585">xsl</span>:<span style="color: #800000">call</span>-template<span style="color: #0000ff">&gt;</span>
</pre><pre style="font-size: 12px; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; background-color: #ffffff">    <span style="color: #0000ff">&lt;/</span><span style="color: #c71585">xsl</span>:<span style="color: #800000">template</span><span style="color: #0000ff">&gt;</span>
</pre><pre style="font-size: 12px; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; background-color: #ffffff"></pre><pre style="font-size: 12px; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; background-color: #ffffff">    <span style="color: #0000ff">&lt;</span><span style="color: #c71585">xsl</span>:<span style="color: #800000">template</span> <span style="color: #ff0000">name</span>=<span style="color: #0000ff">"GenerateRandomNumbers"</span><span style="color: #0000ff">&gt;</span>
</pre><pre style="font-size: 12px; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; background-color: #ffffff">        <span style="color: #0000ff">&lt;</span><span style="color: #c71585">xsl</span>:<span style="color: #800000">param</span> <span style="color: #ff0000">name</span>=<span style="color: #0000ff">"count"</span><span style="color: #0000ff">/&gt;</span>
</pre><pre style="font-size: 12px; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; background-color: #ffffff">        <span style="color: #0000ff">&lt;</span><span style="color: #c71585">xsl</span>:<span style="color: #800000">param</span> <span style="color: #ff0000">name</span>=<span style="color: #0000ff">"curIndex"</span><span style="color: #0000ff">&gt;</span>0<span style="color: #0000ff">&lt;/</span><span style="color: #c71585">xsl</span>:<span style="color: #800000">param</span><span style="color: #0000ff">&gt;</span>
</pre><pre style="font-size: 12px; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; background-color: #ffffff"></pre><pre style="font-size: 12px; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; background-color: #ffffff">        <span style="color: #0000ff">&lt;</span><span style="color: #c71585">xsl</span>:<span style="color: #800000">value</span>-<span style="color: #ff0000">of</span> <span style="color: #ff0000">select</span>=<span style="color: #0000ff">"random:range(0, 100)"</span><span style="color: #0000ff">/&gt;</span>
</pre><pre style="font-size: 12px; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; background-color: #ffffff">        <span style="color: #0000ff">&lt;</span><span style="color: #c71585">xsl</span>:<span style="color: #800000">text</span><span style="color: #0000ff">&gt;</span>&amp;#xD;<span style="color: #0000ff">&lt;/</span><span style="color: #c71585">xsl</span>:<span style="color: #800000">text</span><span style="color: #0000ff">&gt;</span>
</pre><pre style="font-size: 12px; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; background-color: #ffffff"></pre><pre style="font-size: 12px; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; background-color: #ffffff">        <span style="color: #0000ff">&lt;</span><span style="color: #c71585">xsl</span>:<span style="color: #800000">if</span> <span style="color: #ff0000">test</span>=<span style="color: #0000ff">"number($count) != (number($curIndex) + 1)"</span><span style="color: #0000ff">&gt;</span>
</pre><pre style="font-size: 12px; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; background-color: #ffffff">            <span style="color: #0000ff">&lt;</span><span style="color: #c71585">xsl</span>:<span style="color: #800000">call</span>-<span style="color: #ff0000">template</span> <span style="color: #ff0000">name</span>=<span style="color: #0000ff">"GenerateRandomNumbers"</span><span style="color: #0000ff">&gt;</span>
</pre><pre style="font-size: 12px; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; background-color: #ffffff">                <span style="color: #0000ff">&lt;</span><span style="color: #c71585">xsl</span>:<span style="color: #800000">with</span>-<span style="color: #ff0000">param</span> <span style="color: #ff0000">name</span>=<span style="color: #0000ff">"count"</span><span style="color: #0000ff">&gt;</span>
</pre><pre style="font-size: 12px; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; background-color: #ffffff">                    <span style="color: #0000ff">&lt;</span><span style="color: #c71585">xsl</span>:<span style="color: #800000">value</span>-<span style="color: #ff0000">of</span> <span style="color: #ff0000">select</span>=<span style="color: #0000ff">"$count"</span><span style="color: #0000ff">/&gt;</span>
</pre><pre style="font-size: 12px; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; background-color: #ffffff">                <span style="color: #0000ff">&lt;/</span><span style="color: #c71585">xsl</span>:<span style="color: #800000">with</span>-param<span style="color: #0000ff">&gt;</span>
</pre><pre style="font-size: 12px; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; background-color: #ffffff">                <span style="color: #0000ff">&lt;</span><span style="color: #c71585">xsl</span>:<span style="color: #800000">with</span>-<span style="color: #ff0000">param</span> <span style="color: #ff0000">name</span>=<span style="color: #0000ff">"curIndex"</span><span style="color: #0000ff">&gt;</span>
</pre><pre style="font-size: 12px; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; background-color: #ffffff">                    <span style="color: #0000ff">&lt;</span><span style="color: #c71585">xsl</span>:<span style="color: #800000">value</span>-<span style="color: #ff0000">of</span> <span style="color: #ff0000">select</span>=<span style="color: #0000ff">"string(number($curIndex) + 1)"</span><span style="color: #0000ff">/&gt;</span>
</pre><pre style="font-size: 12px; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; background-color: #ffffff">                <span style="color: #0000ff">&lt;/</span><span style="color: #c71585">xsl</span>:<span style="color: #800000">with</span>-param<span style="color: #0000ff">&gt;</span>
</pre><pre style="font-size: 12px; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; background-color: #ffffff">            <span style="color: #0000ff">&lt;/</span><span style="color: #c71585">xsl</span>:<span style="color: #800000">call</span>-template<span style="color: #0000ff">&gt;</span>
</pre><pre style="font-size: 12px; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; background-color: #ffffff">        <span style="color: #0000ff">&lt;/</span><span style="color: #c71585">xsl</span>:<span style="color: #800000">if</span><span style="color: #0000ff">&gt;</span>
</pre><pre style="font-size: 12px; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; background-color: #ffffff">    <span style="color: #0000ff">&lt;/</span><span style="color: #c71585">xsl</span>:<span style="color: #800000">template</span><span style="color: #0000ff">&gt;</span>
</pre><pre style="font-size: 12px; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; background-color: #ffffff"><span style="color: #0000ff">&lt;/</span><span style="color: #c71585">xsl</span>:<span style="color: #800000">stylesheet</span><span style="color: #0000ff">&gt;</span></pre></pre>
<p>You’ll have to modify the stylesheet to suit your specific purpose. In this example, I’m simply generating a list of 200 random numbers between 0 and 100. The magic happens within the msxml:script element. A <em>script</em> element basically allows you to extend the XSL processor to support additional processing it wasn’t designed to do. In this case, since I’m using a Microsoft XSL processor, it’s using <a href="http://en.wikipedia.org/wiki/Jscript_" target="_blank">JScript </a>as the scripting language. If you were to use <a href="http://en.wikipedia.org/wiki/Saxon_XSLT" target="_blank">Saxon</a> however, you will more than likely use Java for the processor extension.</p>
<p>One more thing to note: As I mentioned earlier, I created this somewhat quickly ( a matter of minutes) and just went ahead and used recursion for looping. It should be noted that if you pass a large count value into the GenerateRandomNumbers template, it is possible to overflow the stack and prematurely exit out of the transformation. The key takeaway here it to use the msxml:script element that defines the random:range script function and to call it every once in awhile from a <a href="http://www.w3schools.com/xsl/xsl_value_of.asp" target="_blank">xsl:value-of</a> instruction for example.</p>]]></content:encoded>
    </item>
    <item>
      <title>The Watchmen</title>
      <link>https://docs.microsoft.com/archive/blogs/markhsch/the-watchmen</link>
      <pubDate>Mon, 09 Mar 2009 13:37:00 GMT</pubDate>
      <dc:creator><![CDATA[Mark Schmidt-MSFT]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/markhsch/2009/03/09/the-watchmen/</guid>
      <description><![CDATA[Note: It doesn't have to look, smell, feel, taste like Spiderman to be a great superhero movie. If...]]></description>
      <content:encoded><![CDATA[Note: It doesn't have to look, smell, feel, taste like Spiderman to be a great superhero movie. If you watch it, don't expect the traditional. I give it 5 out of 4 stars!]]></content:encoded>
    </item>
    <item>
      <title>Interested in XSLT?</title>
      <link>https://docs.microsoft.com/archive/blogs/markhsch/interested-in-xslt</link>
      <pubDate>Thu, 19 Jun 2008 17:22:20 GMT</pubDate>
      <dc:creator><![CDATA[Mark Schmidt-MSFT]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/markhsch/2008/06/19/interested-in-xslt/</guid>
      <description><![CDATA[So I'm back to doing some XSLT work now. I did quite a bit during my work at HP and absolutely love...]]></description>
      <content:encoded><![CDATA[<p>So I'm back to doing some XSLT work now. I did quite a bit during my work at HP and absolutely love it (don't ask me why). Since I've spent so much time working with it, I've learned a few tips and tricks not covered in a lot of books. So, is there any interest from the people on the intertubes concerning XSLT? If so, comment here or email me and if enough interest develops, I'll get going on it. Or, here's a list of other things I can post about:</p>  <ul>   <li>Transforming multiple XML documents at a time with XSLT</li>    <ul>     <li>Quick code snippet would be a localization pattern with XSLT that will look in 1 XML file for an element and if it can't find it will fallback to a different file for the string</li>   </ul>    <li>.NET within Windows Sidebar</li>    <ul>     <li>I've posted my .NET gadget creator which includes my solution for unloading assemblies from the Sidebar without having to stop the sidebar. However, I haven't gone into detail about how I do it nor have I posted code. Any interest in seeing this?</li>   </ul>    <li>Webcam</li>    <ul>     <li>Any interest in any more webcam stuff? Want me to update it with bugs people have mentioned (ability to select webcam for instance)</li>   </ul>    <li>COM stuff</li>    <ul>     <li>Yes, I still use it. I'm sure I have some code laying around that I can blog about.</li>   </ul>    <li>Game programming</li>    <ul>     <li>I have a pretty cool web based Ajax game I tinker with now and then. I posted 1 entry about it. I can continue with more if any interest. The dynamic server side image generation (which is streamed to the client instead of being placed in a file on the server) would be a good one.</li>   </ul>    <li>A good way to prevent people from downloading images from your web page (still can take a screenshot but this solution is still cool). Related to the above entry.</li>    <li>Anything else that I've blogged about that you want more info on?</li> </ul>]]></content:encoded>
    </item>
    <item>
      <title>Skydrive, I Can Haz More Space?</title>
      <link>https://docs.microsoft.com/archive/blogs/markhsch/skydrive-i-can-haz-more-space</link>
      <pubDate>Thu, 21 Feb 2008 13:36:22 GMT</pubDate>
      <dc:creator><![CDATA[Mark Schmidt-MSFT]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/markhsch/2008/02/21/skydrive-i-can-haz-more-space/</guid>
      <description><![CDATA[Skydrive yesterday...     Skydrive today...     Find out more about the new Skydrive release (note,...]]></description>
      <content:encoded><![CDATA[<p>Skydrive yesterday...</p>  <p><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/BlogFileStorage/blogs_msdn/markhsch/WindowsLiveWriter/SkydriveICanHazMoreSpace_951D/image_2.png" original-url="http://blogs.msdn.com/blogfiles/markhsch/WindowsLiveWriter/SkydriveICanHazMoreSpace_951D/image_2.png"><img style="border-right: 0px; border-top: 0px; border-left: 0px; border-bottom: 0px" height="57" alt="image" src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/BlogFileStorage/blogs_msdn/markhsch/WindowsLiveWriter/SkydriveICanHazMoreSpace_951D/image_thumb.png" original-url="http://blogs.msdn.com/blogfiles/markhsch/WindowsLiveWriter/SkydriveICanHazMoreSpace_951D/image_thumb.png" width="244" border="0" /></a> </p>  <p>Skydrive today...</p>  <p><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/BlogFileStorage/blogs_msdn/markhsch/WindowsLiveWriter/SkydriveICanHazMoreSpace_951D/image_4.png" original-url="http://blogs.msdn.com/blogfiles/markhsch/WindowsLiveWriter/SkydriveICanHazMoreSpace_951D/image_4.png"><img style="border-right: 0px; border-top: 0px; border-left: 0px; border-bottom: 0px" height="53" alt="image" src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/BlogFileStorage/blogs_msdn/markhsch/WindowsLiveWriter/SkydriveICanHazMoreSpace_951D/image_thumb_1.png" original-url="http://blogs.msdn.com/blogfiles/markhsch/WindowsLiveWriter/SkydriveICanHazMoreSpace_951D/image_thumb_1.png" width="244" border="0" /></a> </p>  <p>Find out more about the new Skydrive release (note, no beta tag anymore) <a href="http://skydriveteam.spaces.live.com/blog/">here</a>. </p>]]></content:encoded>
    </item>
    <item>
      <title>Visual Studio Tip : AutoFormat Your Code</title>
      <link>https://docs.microsoft.com/archive/blogs/markhsch/visual-studio-tip-autoformat-your-code</link>
      <pubDate>Thu, 10 Jan 2008 16:16:51 GMT</pubDate>
      <dc:creator><![CDATA[Mark Schmidt-MSFT]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/markhsch/2008/01/10/visual-studio-tip-autoformat-your-code/</guid>
      <description><![CDATA[Has this ever happened to you? You find some code on the Net so you copy and paste it into a source...]]></description>
      <content:encoded><![CDATA[<p>Has this ever happened to you? You find some code on the Net so you copy and paste it into a source file within Visual Studio and notice that all the formatting is somehow messed up. For example. some lines might be indented while others are not.</p> <p>To have Visual Studio fix it all up nice and tidy for you, select the text, hold CTRL and hit K followed by F (CTRL+K-F). What I usually do is do a CTRL-A to select all text then do the CTRL+K-F combo. Voila!</p>]]></content:encoded>
    </item>
    <item>
      <title>Embedding Screensaver's in a Windows Form</title>
      <link>https://docs.microsoft.com/archive/blogs/markhsch/embedding-screensavers-in-a-windows-form</link>
      <pubDate>Tue, 18 Dec 2007 16:37:51 GMT</pubDate>
      <dc:creator><![CDATA[Mark Schmidt-MSFT]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/markhsch/2007/12/18/embedding-screensavers-in-a-windows-form/</guid>
      <description><![CDATA[Awhile ago I created the screensaver Vista Sidebar gadget and promised I would put some code up. As...]]></description>
      <content:encoded><![CDATA[<p>Awhile ago I created the screensaver Vista Sidebar gadget and promised I would put some code up. As promised, here it is. It's actually quite easy to create something like this, and truth be told I actually had the code lying around for a few years since I wrote it for my 2nd book. Rather than confuse you with any sidebar code, I just created a simple Windows Form that hosts the screensaver UserControl (full source code can be downloaded below).</p> <p>The hardest part (which is actually somewhat easy) is telling Windows to launch the screensaver within a certain window rather than fullscreen. You've seen this window in the control panel and may have wondered how it's done. To do this, you simply launch the screensaver (.scr file) and pass a command line parameter (/p for preview) and your window handle. The window handle can be accessed in a Windows Form or UserControl through the <em>Handle</em> property.</p> <p>Below is the code that embeds a screensaver in my custom UserControl. You can see that I first check to see if a screensaver is already running and if it is, I tell it to stop (Kill). I then simply check to make sure my UserControl <em>ScreensaverPath</em> property is set and if it is I launch the executable using <em>Process.Start</em> with associated command line arguments (<strong>/p</strong> <strong>&lt;window handle&gt;</strong>).</p> <div style="font-weight: bold; font-size: 10pt; background: white; color: black; font-family: consolas"> <p style="margin: 0px"><span style="font-weight: normal; color: blue">private</span> <span style="font-weight: normal; color: blue">void</span> <span style="font-weight: normal; color: #020002">LaunchScreensaver</span>(<span style="font-weight: normal; color: blue">string</span> <span style="font-weight: normal; color: #020002">args</span>)</p> <p style="margin: 0px">{</p> <p style="margin: 0px">&nbsp;&nbsp;&nbsp; <span style="font-weight: normal; color: blue">try</span></p> <p style="margin: 0px">&nbsp;&nbsp;&nbsp; {</p> <p style="margin: 0px">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <span style="font-weight: normal; color: blue">if</span> (<span style="font-weight: normal; color: #020002">screenSaverProc</span> != <span style="font-weight: normal; color: blue">null</span>)</p> <p style="margin: 0px">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {</p> <p style="margin: 0px">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <span style="font-weight: normal; color: #020002">screenSaverProc</span><span style="font-weight: normal">.</span><span style="font-weight: normal; color: #020002">Kill</span>();</p> <p style="margin: 0px">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <span style="font-weight: normal; color: #020002">screenSaverProc</span> = <span style="font-weight: normal; color: blue">null</span>;</p> <p style="margin: 0px">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }</p> <p style="margin: 0px">&nbsp;</p> <p style="margin: 0px">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <span style="font-weight: normal; color: blue">if</span> (!<span style="font-weight: normal; color: #2b91af">String</span><span style="font-weight: normal">.</span><span style="font-weight: normal; color: #020002">IsNullOrEmpty</span>(<span style="font-weight: normal; color: #020002">screenSaverPath</span>))</p> <p style="margin: 0px">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {</p> <p style="margin: 0px">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <span style="font-weight: normal; color: blue">this</span><span style="font-weight: normal">.</span><span style="font-weight: normal; color: #020002">Visible</span> = <span style="font-weight: normal; color: blue">true</span>;</p> <p style="margin: 0px">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <span style="font-weight: normal; color: #2b91af">ProcessStartInfo</span> <span style="font-weight: normal; color: #020002">startInfo</span> = <span style="font-weight: normal; color: blue">new</span> <span style="font-weight: normal; color: #2b91af">ProcessStartInfo</span>(<span style="font-weight: normal; color: #020002">screenSaverPath</span> + <span style="font-weight: normal; color: #020002">args</span>, <span style="font-weight: normal; color: #a31515">""</span>);</p> <p style="margin: 0px">&nbsp;</p> <p style="margin: 0px">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <span style="font-weight: normal; color: #020002">startInfo</span><span style="font-weight: normal">.</span><span style="font-weight: normal; color: #020002">UseShellExecute</span> = <span style="font-weight: normal; color: blue">false</span>;</p> <p style="margin: 0px">&nbsp;</p> <p style="margin: 0px">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <span style="font-weight: normal; color: #020002">screenSaverProc</span> = <span style="font-weight: normal; color: #2b91af">Process</span><span style="font-weight: normal">.</span><span style="font-weight: normal; color: #020002">Start</span>(<span style="font-weight: normal; color: #020002">startInfo</span>);</p> <p style="margin: 0px">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }</p> <p style="margin: 0px">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <span style="font-weight: normal; color: blue">else</span></p> <p style="margin: 0px">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {</p> <p style="margin: 0px">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <span style="font-weight: normal; color: blue">this</span><span style="font-weight: normal">.</span><span style="font-weight: normal; color: #020002">Visible</span> = <span style="font-weight: normal; color: blue">false</span>;</p> <p style="margin: 0px">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }</p> <p style="margin: 0px">&nbsp;&nbsp;&nbsp; }</p> <p style="margin: 0px">&nbsp;&nbsp;&nbsp; <span style="font-weight: normal; color: blue">catch</span> (<span style="font-weight: normal; color: #2b91af">Exception</span> <span style="font-weight: normal; color: #020002">ex</span>)</p> <p style="margin: 0px">&nbsp;&nbsp;&nbsp; {</p> <p style="margin: 0px">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <span style="font-weight: normal; color: blue">throw</span> <span style="font-weight: normal; color: blue">new</span> <span style="font-weight: normal; color: #2b91af">Exception</span>(<span style="font-weight: normal; color: #a31515">"Could not launch screensaver:"</span> + <span style="font-weight: normal; color: blue">this</span><span style="font-weight: normal">.</span><span style="font-weight: normal; color: #020002">screenSaverPath</span>, <span style="font-weight: normal; color: #020002">ex</span>);</p> <p style="margin: 0px">&nbsp;&nbsp;&nbsp; }</p> <p style="margin: 0px">}</p></div> <p>To wire this up to the Windows Form, I simply expose a property named <em>ScreensaverPath</em>. Whenever the form sets this property, I call <em>LaunchScreensaver</em> and pass the appropriate command line arguments as shown below.</p> <div style="font-weight: bold; font-size: 10pt; background: white; color: black; font-family: consolas"> <p style="margin: 0px"><span style="font-weight: normal; color: blue">public</span> <span style="font-weight: normal; color: blue">string</span> <span style="font-weight: normal; color: #020002">ScreensaverPath</span></p> <p style="margin: 0px">{</p> <p style="margin: 0px">&nbsp;&nbsp;&nbsp; <span style="font-weight: normal; color: blue">get</span> { <span style="font-weight: normal; color: blue">return</span> <span style="font-weight: normal; color: #020002">screenSaverPath</span>; }</p> <p style="margin: 0px">&nbsp;&nbsp;&nbsp; <span style="font-weight: normal; color: blue">set</span></p> <p style="margin: 0px">&nbsp;&nbsp;&nbsp; {</p> <p style="margin: 0px">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <span style="font-weight: normal; color: blue">this</span><span style="font-weight: normal">.</span><span style="font-weight: normal; color: #020002">Visible</span> = <span style="font-weight: normal; color: blue">true</span>;</p> <p style="margin: 0px">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <span style="font-weight: normal; color: #020002">screenSaverPath</span> = <span style="font-weight: normal; color: blue">value</span>;</p> <p style="margin: 0px">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <span style="font-weight: normal; color: #020002">LaunchScreensaver</span>(<span style="font-weight: normal; color: #a31515">" \"/p"</span> + <span style="font-weight: normal; color: blue">this</span><span style="font-weight: normal">.</span><span style="font-weight: normal; color: #020002">Handle</span><span style="font-weight: normal">.</span><span style="font-weight: normal; color: #020002">ToString</span>() + <span style="font-weight: normal; color: #a31515">"\""</span>);</p> <p style="margin: 0px">&nbsp;&nbsp;&nbsp; }</p> <p style="margin: 0px">}</p></div> <p>Here's a couple screenshots of the Screensaver Form project running various Vista screensavers.</p> <p><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/BlogFileStorage/blogs_msdn/markhsch/WindowsLiveWriter/EmbeddingScreensaversinaWindowsForm_BA97/image_2.png" original-url="http://blogs.msdn.com/blogfiles/markhsch/WindowsLiveWriter/EmbeddingScreensaversinaWindowsForm_BA97/image_2.png"><img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="244" alt="bubbles" src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/BlogFileStorage/blogs_msdn/markhsch/WindowsLiveWriter/EmbeddingScreensaversinaWindowsForm_BA97/image_thumb.png" original-url="http://blogs.msdn.com/blogfiles/markhsch/WindowsLiveWriter/EmbeddingScreensaversinaWindowsForm_BA97/image_thumb.png" width="244" border="0"></a> <a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/BlogFileStorage/blogs_msdn/markhsch/WindowsLiveWriter/EmbeddingScreensaversinaWindowsForm_BA97/image_4.png" original-url="http://blogs.msdn.com/blogfiles/markhsch/WindowsLiveWriter/EmbeddingScreensaversinaWindowsForm_BA97/image_4.png"><img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="244" alt="skyrocket" src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/BlogFileStorage/blogs_msdn/markhsch/WindowsLiveWriter/EmbeddingScreensaversinaWindowsForm_BA97/image_thumb_1.png" original-url="http://blogs.msdn.com/blogfiles/markhsch/WindowsLiveWriter/EmbeddingScreensaversinaWindowsForm_BA97/image_thumb_1.png" width="244" border="0"></a> </p> <p><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/BlogFileStorage/blogs_msdn/markhsch/WindowsLiveWriter/EmbeddingScreensaversinaWindowsForm_BA97/image_6.png" original-url="http://blogs.msdn.com/blogfiles/markhsch/WindowsLiveWriter/EmbeddingScreensaversinaWindowsForm_BA97/image_6.png"><img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="244" alt="mystify" src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/BlogFileStorage/blogs_msdn/markhsch/WindowsLiveWriter/EmbeddingScreensaversinaWindowsForm_BA97/image_thumb_2.png" original-url="http://blogs.msdn.com/blogfiles/markhsch/WindowsLiveWriter/EmbeddingScreensaversinaWindowsForm_BA97/image_thumb_2.png" width="244" border="0"></a> <a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/BlogFileStorage/blogs_msdn/markhsch/WindowsLiveWriter/EmbeddingScreensaversinaWindowsForm_BA97/image_8.png" original-url="http://blogs.msdn.com/blogfiles/markhsch/WindowsLiveWriter/EmbeddingScreensaversinaWindowsForm_BA97/image_8.png"><img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="244" alt="ribbons" src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/BlogFileStorage/blogs_msdn/markhsch/WindowsLiveWriter/EmbeddingScreensaversinaWindowsForm_BA97/image_thumb_3.png" original-url="http://blogs.msdn.com/blogfiles/markhsch/WindowsLiveWriter/EmbeddingScreensaversinaWindowsForm_BA97/image_thumb_3.png" width="244" border="0"></a> </p> <p>As promised, here's the code. Also, one thing to note. Some screensavers don't play nice with the <strong>/p</strong> parameter. I haven't look into why this is, but in most cases the default Vista screensavers work just fine.</p><iframe style="border-right: #dde5e9 1px solid; padding-right: 0px; border-top: #dde5e9 1px solid; padding-left: 0px; padding-bottom: 0px; margin: 3px; border-left: #dde5e9 1px solid; width: 240px; padding-top: 0px; border-bottom: #dde5e9 1px solid; height: 66px; background-color: #ffffff" marginwidth="0" marginheight="0" src="http://cid-d0866aae93a8e1aa.skydrive.live.com/embedrowdetail.aspx/Blog/ScreenSaverControl.zip" frameborder="0" scrolling="no"></iframe>]]></content:encoded>
    </item>
    <item>
      <title>Next "For Fun" Project</title>
      <link>https://docs.microsoft.com/archive/blogs/markhsch/next-for-fun-project</link>
      <pubDate>Wed, 12 Dec 2007 01:44:33 GMT</pubDate>
      <dc:creator><![CDATA[Mark Schmidt-MSFT]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/markhsch/2007/12/12/next-for-fun-project/</guid>
      <description><![CDATA[For those that follow my crazy forays into stuff that I think is just plain cool, I have begun yet...]]></description>
      <content:encoded><![CDATA[<p>For those that follow my crazy forays into stuff that I think is just plain cool, I have begun yet another project. No crazy hacking in the sidebar. No more new webcam stuff (yet). No screen scraping with Outlook calendar appointment setting. I'm off into web land starting an Ajax based RPG similar to a game called Kingdom of Loathing.</p>  <p>It's a turn based RPG whose maps are hex tiles. I'm doing some crazy dynamic image generation and its all stream based so as not to fill up the server hard disk (and to keep memory in check, the stream is closed rather being saved off somewhere like the Session object).</p>  <p>I've opted to go for a pipeline based architecture consisting right now of 2 pipelines. The logic pipeline which will react and update the game variables based on user input and the rendering pipeline which I'm working on now. Since the game has so many different parts (the user avatar, monsters, cities, treasures, inventory, etc...) I wanted to break it down thus leading me to the pipeline. Just to show how easy it is to get something into the dynamic image that is generated by the map, I'll show some really early pre-pre-pre-alpha code here. Here's the main game controller object demonstrating the creation of the rendering pipeline. There are 2 pipeline objects: the map renderer which simply draws the hex grid and then a test object which simply draws a rectangle as a proof of concept. Now that the architecture is in place, it's extremely easy to inject new renderers into the rendering pipeline.</p>  <p class="MsoNormal" style="margin-bottom: 0pt; line-height: normal; mso-layout-grid-align: none"><span style="font-size: 10pt; color: blue; font-family: " courier new"; mso-no-proof: yes">private</span><span style="font-size: 10pt; font-family: " courier new"; mso-no-proof: yes"> <span style="color: blue">void</span> <span style="color: #010001">LoadGameRenderPipeline</span>()      <br /></span><span style="font-size: 10pt; font-family: " courier new"; mso-no-proof: yes">{     <br /></span><span style="font-size: 10pt; font-family: " courier new"; mso-no-proof: yes"><span style="mso-spacerun: yes">&#160;&#160;&#160; </span><span style="color: #2b91af">IPipelineObject</span> <span style="color: #010001">mapRenderer</span> = <span style="color: blue">new</span> <span style="color: #2b91af">MapRenderPipelineObject</span>();      <br /></span><span style="font-size: 10pt; font-family: " courier new"; mso-no-proof: yes"><span style="mso-spacerun: yes">&#160;&#160;&#160; </span><span style="color: #2b91af">IPipelineObject</span> <span style="color: #010001">testDecorator</span> = <span style="color: blue">new</span> <span style="color: #2b91af">MapDecoratorTest</span>();      <br /></span><span style="font-size: 10pt; font-family: " courier new"; mso-no-proof: yes"><span style="mso-spacerun: yes">       <br />&#160;&#160;&#160; </span><span style="color: #010001">renderPipeline</span>.<span style="color: #010001">Add</span>(<span style="color: #010001">mapRenderer</span>);      <br /></span><span style="font-size: 10pt; font-family: " courier new"; mso-no-proof: yes"><span style="mso-spacerun: yes">&#160;&#160;&#160; </span><span style="color: #010001">renderPipeline</span>.<span style="color: #010001">Add</span>(<span style="color: #010001">testDecorator</span>);      <br /></span><span style="font-size: 10pt; font-family: " courier new"; mso-no-proof: yes; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-ansi-language: EN-US; mso-fareast-language: EN-US; mso-bidi-language: AR-SA">}</span> </p>  <p>Once the logic pipeline finishes, I can then enumerate through all the rendering pipeline objects and tell them to execute in order. I also use something I'm calling a PipelineContext in order for the pipeline objects to share information rather than having each individual object do something stupid like hitting the database, reading from storage, or stuffing everything in the Session object.</p>  <p>Just for fun, here's the Execute method for the MapDecoratorTest object (in the image below, it's the object that drew that red rectangle on top of the map that the MapRenderPipelineObject created). Oh, and disregard the nasty naming convention. It's prototype code :-)</p>  <p class="MsoNormal" style="margin-bottom: 0pt; line-height: normal; mso-layout-grid-align: none"><span style="font-size: 10pt; color: blue; font-family: " courier new"; mso-no-proof: yes">public</span><span style="font-size: 10pt; font-family: " courier new"; mso-no-proof: yes"> <span style="color: blue">void</span> <span style="color: #010001">Execute</span>(<span style="color: #2b91af">PipelineContext</span> <span style="color: #010001">pipelineContext</span>)      <br /></span><span style="font-size: 10pt; font-family: " courier new"; mso-no-proof: yes">{     <br /></span><span style="font-size: 10pt; font-family: " courier new"; mso-no-proof: yes"><span style="mso-spacerun: yes">&#160;&#160;&#160; </span><span style="color: #2b91af">MemoryStream</span> <span style="color: #010001">ms</span> = <span style="color: #010001">pipelineContext</span>[<span style="color: #a31515">&quot;MapImageStream&quot;</span>] <span style="color: blue">as</span> <span style="color: #2b91af">MemoryStream</span>;      <br /></span><span style="font-size: 10pt; font-family: " courier new"; mso-no-proof: yes">     <p>&#160; <br /></p>   </span><span style="font-size: 10pt; font-family: " courier new"; mso-no-proof: yes"><span style="mso-spacerun: yes">&#160;&#160;&#160; </span><span style="color: #2b91af">Bitmap</span> <span style="color: #010001">bm</span> = <span style="color: #2b91af">Bitmap</span>.<span style="color: #010001">FromStream</span>(<span style="color: #010001">ms</span>) <span style="color: blue">as</span> <span style="color: #2b91af">Bitmap</span>;      <br /></span><span style="font-size: 10pt; font-family: " courier new"; mso-no-proof: yes"><span style="mso-spacerun: yes">&#160;&#160;&#160; </span><span style="color: #2b91af">Graphics</span> <span style="color: #010001">g</span> = <span style="color: #2b91af">Graphics</span>.<span style="color: #010001">FromImage</span>(<span style="color: #010001">bm</span>);      <br /></span><span style="font-size: 10pt; font-family: " courier new"; mso-no-proof: yes"><span style="mso-spacerun: yes">&#160;&#160;&#160; </span><span style="color: #010001">g</span>.<span style="color: #010001">FillRectangle</span>(<span style="color: blue">new</span> <span style="color: #2b91af">SolidBrush</span>(<span style="color: #2b91af">Color</span>.<span style="color: #010001">Red</span>), 0, 0, 200, 300);      <br /></span><span style="font-size: 10pt; font-family: " courier new"; mso-no-proof: yes"><span style="mso-spacerun: yes">&#160;&#160;&#160; </span><span style="color: #010001">bm</span>.<span style="color: #010001">Save</span>(<span style="color: #010001">ms</span>, <span style="color: #2b91af">ImageFormat</span>.<span style="color: #010001">Png</span>);      <br /></span><span style="font-size: 10pt; font-family: " courier new"; mso-no-proof: yes; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-ansi-language: EN-US; mso-fareast-language: EN-US; mso-bidi-language: AR-SA">}</span> </p>  <p><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/BlogFileStorage/blogs_msdn/markhsch/WindowsLiveWriter/NextForFunProject_13FC3/image_2.png" original-url="http://blogs.msdn.com/blogfiles/markhsch/WindowsLiveWriter/NextForFunProject_13FC3/image_2.png"><img style="border-right: 0px; border-top: 0px; border-left: 0px; border-bottom: 0px" height="484" alt="Prototype Image" src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/BlogFileStorage/blogs_msdn/markhsch/WindowsLiveWriter/NextForFunProject_13FC3/image_thumb.png" original-url="http://blogs.msdn.com/blogfiles/markhsch/WindowsLiveWriter/NextForFunProject_13FC3/image_thumb.png" width="435" border="0" /></a></p>]]></content:encoded>
    </item>
    <item>
      <title>A Christmas Card for my Readers</title>
      <link>https://docs.microsoft.com/archive/blogs/markhsch/a-christmas-card-for-my-readers</link>
      <pubDate>Fri, 07 Dec 2007 18:06:36 GMT</pubDate>
      <dc:creator><![CDATA[Mark Schmidt-MSFT]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/markhsch/2007/12/07/a-christmas-card-for-my-readers/</guid>
      <description><![CDATA[Most people have seen it at least once in their life. In my family, the picture below is referenced...]]></description>
      <content:encoded><![CDATA[<p>Most people have seen it at least once in their life. In my family, the picture below is referenced every year. Merry Christmas and Happy Holidays.</p> <p>-Mark <strong>Schmidt</strong></p> <p><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/BlogFileStorage/blogs_msdn/markhsch/WindowsLiveWriter/AChristmasCardformyReaders_D46D/309854993_bba4665187_2.jpg" original-url="http://blogs.msdn.com/blogfiles/markhsch/WindowsLiveWriter/AChristmasCardformyReaders_D46D/309854993_bba4665187_2.jpg"><img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="484" alt="309854993_bba4665187" src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/BlogFileStorage/blogs_msdn/markhsch/WindowsLiveWriter/AChristmasCardformyReaders_D46D/309854993_bba4665187_thumb.jpg" original-url="http://blogs.msdn.com/blogfiles/markhsch/WindowsLiveWriter/AChristmasCardformyReaders_D46D/309854993_bba4665187_thumb.jpg" width="402" border="0"></a> </p> <p>Oh and a extra special shout out to all the Schmidt's at Microsoft including the 3 other Mark Schmidt's (yes, there are 4 Mark Schmidt's here)!</p>]]></content:encoded>
    </item>
    <item>
      <title>Check Out Community Credit</title>
      <link>https://docs.microsoft.com/archive/blogs/markhsch/check-out-community-credit</link>
      <pubDate>Thu, 06 Dec 2007 14:32:34 GMT</pubDate>
      <dc:creator><![CDATA[Mark Schmidt-MSFT]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/markhsch/2007/12/06/check-out-community-credit/</guid>
      <description><![CDATA[I also run a personal blog which I use to post about things that I don't think fall under the realm...]]></description>
      <content:encoded><![CDATA[<p>I also run a personal blog which I use to post about things that I don't think fall under the realm of "work" although there is still a fair amount of code there too since coding is not only a job, but a hobby as well. More often than not, I'll post a link to my msdn blog on the site pointing user's. One day I received an email invitation from another website that my blog host (geekwithblogs.net) partners with. Since I'm a paranoid user, I approached with trepidation but found out that it actually is a very keen idea and one that I don't mind participating in.</p> <p>Basically, community-credit.com gives a blogger a certain amount of points for a variety of things (blogging about something is naturally something). While I've looked through the site, I can see a lot of reasons why this is a really good thing. Here's what I've come up with:</p> <p>1. It encourages you to blog. I've seen a lot of blogs that start with the line "Hello World! I've set up a blog. Expect more soon". This is followed then by crickets chirping and the sound of wind blowing in the background as said person is silent for days if not months.</p> <p>2. It recognizes those that contribute. The reason I blog is simple: I want other people to know what I know because if it excites me, it'll excite someone else to do further investigation. So let's say I create a cool tool/application/gadget/etc... and blog about it. I'll then get an email or comment that asks me if it can do "such and such". Wow I think. I never thought about that. Let's look into it together. Here's the source code. Use your imagination and see what you come up with. So its this sort if disconnected collaboration and discussion that I find intriguing. It's also one of the main tenants we have here at Microsoft...passion. I'm passionate about development and can talk for hours on end. Give me a new laptop and the first thing that goes on it (after any patches of course) is Visual Studio (followed closely by games naturally for the times my brain is fried).</p> <p>3. It allows for discovery. The blogging community is exploding at an almost exponential pace. There are a lot of "fluff" blogs out there so any tool that exists to help you weed out the good from the bad is spot on in my opinion. If you blog regularly, chances are you have something important to say. Even if you are what I call a "link blog", you still are informing people.</p> <p>4. It's just plain fun. There tag line is "Stupid Prizes for Smart People". I tend to disagree with the "stupid prizes" part since what they have on there is everything a geek like me would want. Of course, for the non-geek, yeah, I guess they're pretty stupid though.</p> <p>I encourage you to check them out. I encourage you to get off your can (or rather sit on your can in this case) and get blogging. You have something important to share (ok, I'm starting to sound like General Patton now). Coding is my life. Sharing information ranks right up there (which is why I also am passionate about writing). It's the exchange of ideas and the personality of developers that sets this industry apart from others. Chances are, my dad, who's a mechanical contractor, doesn't read a lot of mechanical contracting blogs :-)</p> <p>Last thing, I was chosen as a featured developer on the site. There are greater numbers of developers out there that can code me into the ground. You could be one. Go check them out.</p> <p><a href="http://www.community-credit.com/cs/blogs/community_credit_news/archive/2007/12/06/Welcome-to-the-Developer-Community.aspx">Community Credit News : Welcome to the Developer Community</a></p>]]></content:encoded>
    </item>
    <item>
      <title>Good Luck at State Skyline Spartans!</title>
      <link>https://docs.microsoft.com/archive/blogs/markhsch/good-luck-at-state-skyline-spartans</link>
      <pubDate>Fri, 30 Nov 2007 14:39:56 GMT</pubDate>
      <dc:creator><![CDATA[Mark Schmidt-MSFT]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/markhsch/2007/11/30/good-luck-at-state-skyline-spartans/</guid>
      <description><![CDATA[My son's high school (and eventually other 3 kids' high school) is playing in the AAA state football...]]></description>
      <content:encoded><![CDATA[<p><a href="http://www.shs.issaquah.wednet.edu/" target="_blank"><img title="mist_w7n08iftauae3h6rhueh_1.gif" style="margin: 0px 10px 0px 0px" height="160" alt="Skyline Spartans Logo" src="http://t3.images.live.com/images/thumbnail.aspx?q=1419405776322&amp;id=27eae76a2d60560cccc3f5ca94a45928" width="135" align="left"></a>My son's high school (and eventually other 3 kids' high school) is playing in the AAA state football championship game at the Tacoma Dome tonight. I wish them the best of luck. Unfortunately, I can't make it due to other commitments. When I moved up to this area, the Spartans won the AAAA state championship and moved back down to AAA after that. Last year they didn't fare as well but they're back up and running. I coached in the Skyline Spartan youth football program and really feel they're doing the right thing and it shows since this is the 2nd time in the 3 years that I've been here that the high school is playing the championship game.</p> <p>Tonight's game is a little more exciting for me for one single reason...REVENGE! Let me take you back to 1990 when I was a Junior in high school. I attended Prairie High School (AAA at the time) in Brush Prairie, WA. I was the starting right guard (only junior that started on offense) and we made it to the playoffs. The first round, after having basically been written off by everyone was exciting as we beat a team that was supposed to be the top dog. We then had to travel up north to that field that's right next to the space needle (can't remember the name). Here's the connection, the team we played was O'Dea, the same team that Skyline is playing tonight. I am one that usually accepts a loss as a loss and never complain about the officiating (well, there was that Seahawk Super Bowl thing a little while ago, but that's not the point). It was 4th quarter and we were ahead by I believe 1 point. O'Dea had the ball and the clock was almost out. With the clock winding down, they made a good play to get them in field goal range. The kicker was that they were all out of timeouts and there was only seconds on the clock which means we were about to come away with a victory since it would have been a miracle for them to set up and hike the ball to kick the field goal. So, Murphy's law kicks in and the officials...STOPPED THE CLOCK! Keep in mind, O'Dea didn't have any timeouts left and there was only like 3 seconds left in the game. They stopped the clock allowing O'Dea to setup for the field goal. The officials started the clock, O'Dea hiked the ball and made the field goal to run away with the victory. We were absolutely devastated and frankly we were robbed. We ended up taking 7th in state that year.</p> <p>Fast forward to 1991 when I entered college as a freshman. As if God was looking down at me to test my adversity, one of my college roommates (I lived in a 4 person dorm) was from O'Dea. He remembered the game and also agreed it was a fluke. Oh well. Tonight will be sweet revenge</p>]]></content:encoded>
    </item>
  </channel>
</rss>