<?xml version="1.0" encoding="utf-8"?>
<rss xmlns:atom="www.w3.org/2005/Atom" xmlns:sy="purl.org/rss/1.0/modules/syndication/" xmlns:dc="purl.org/dc/elements/1.1/" xmlns:content="purl.org/rss/1.0/modules/content/" xmlns:wfw="wellformedweb.org/CommentAPI/" xmlns:slash="purl.org/rss/1.0/modules/slash/"
  version="2.0">
  <channel>
    <title>Code/Tea/Etc...</title>
    <atom:link
      href="https://docs.microsoft.com/archive/blogs/duncanma/feed.xml"
      rel="self"
      type="application/rss+xml" />
    <link>https://docs.microsoft.com/archive/blogs/duncanma/feed.xml</link>
    <description>Duncan Mackenzie has too much time on his hands</description>
    <lastBuildDate>Tue, 16 Apr 2019 05:04:41 GMT</lastBuildDate>
    <language>en-US</language>
    <sy:updatePeriod>hourly</sy:updatePeriod>
    <sy:updateFrequency>1</sy:updateFrequency>
    <item>
      <title>This blog has moved... notice #2...</title>
      <link>https://docs.microsoft.com/archive/blogs/duncanma/this-blog-has-moved-notice-2</link>
      <pubDate>Wed, 15 Sep 2004 22:17:00 GMT</pubDate>
      <dc:creator><![CDATA[Duncanma]]></dc:creator>
      <guid
        isPermaLink="false">qa.msdn.wdslab.com/duncanma/2004/09/15/this-blog-has-moved-notice-2/</guid>
      <description><![CDATA[For various reasons, the biggest being my desire to play around with .Text, I've moved my blog to my...]]></description>
      <content:encoded><![CDATA[<p>For various reasons, the biggest being my desire to play around with .Text, I've moved my blog to my own server at <a href="blogs.duncanmackenzie.net/duncanma" target="_blank">blogs.duncanmackenzie.net/duncanma</a></p> <p><em>following the 3 leaf model when they moved, I thought I should post this notice a couple of times...</em> </p>]]></content:encoded>
    </item>
    <item>
      <title>This blog has moved...</title>
      <link>https://docs.microsoft.com/archive/blogs/duncanma/this-blog-has-moved</link>
      <pubDate>Wed, 25 Aug 2004 10:11:00 GMT</pubDate>
      <dc:creator><![CDATA[Duncanma]]></dc:creator>
      <guid
        isPermaLink="false">qa.msdn.wdslab.com/duncanma/2004/08/25/this-blog-has-moved/</guid>
      <description><![CDATA[For various reasons, the biggest being my desire to play around with .Text, I've moved my blog to my...]]></description>
      <content:encoded><![CDATA[<p>For various reasons, the biggest being my desire to play around with .Text, I've moved my blog to my own server at <a href="blogs.duncanmackenzie.net" target="_blank">blogs.duncanmackenzie.net</a></p>
<p><a href="blogs.duncanmackenzie.net/duncanma/archive/2004/08/25/589.aspx" target="_blank">The first post over there</a> shows the app that I wrote last night and then used to copy all of my posts and categories over from this blog to the new location... I'll post the code for that app at some point, as boring as it is...</p>
]]></content:encoded>
    </item>
    <item>
      <title>Has anyone tried migrating posts from weblogs.asp.net to another .Text installation?</title>
      <link>https://docs.microsoft.com/archive/blogs/duncanma/has-anyone-tried-migrating-posts-from-weblogs-asp-net-to-another-text-installation</link>
      <pubDate>Tue, 24 Aug 2004 17:29:00 GMT</pubDate>
      <dc:creator><![CDATA[Duncanma]]></dc:creator>
      <guid
        isPermaLink="false">qa.msdn.wdslab.com/duncanma/2004/08/24/has-anyone-tried-migrating-posts-from-weblogs-asp-net-to-another-text-installation/</guid>
      <description><![CDATA[I've set up my own little .Text installation and I'm considering copying (not removing the existing...]]></description>
      <content:encoded><![CDATA[<p>I've set up my own little .Text installation and I'm considering copying (not removing the existing versions) posts to my installation so that I still have a visible archive... has anyone done this before? <br /><br />
Happen to have created a tool or script to help the process?</p>]]></content:encoded>
    </item>
    <item>
      <title>Wes Haggard discusses the new iterators in C# 2.0</title>
      <link>https://docs.microsoft.com/archive/blogs/duncanma/wes-haggard-discusses-the-new-iterators-in-c-2-0</link>
      <pubDate>Mon, 23 Aug 2004 23:13:00 GMT</pubDate>
      <dc:creator><![CDATA[Duncanma]]></dc:creator>
      <guid
        isPermaLink="false">qa.msdn.wdslab.com/duncanma/2004/08/23/wes-haggard-discusses-the-new-iterators-in-c-2-0/</guid>
      <description><![CDATA[Recusive GetFiles for DirectoryInfo via a C# Iterator 
I have been working on a project using C#...]]></description>
      <content:encoded><![CDATA[<blockquote><p><b><a href="https://weblogs.asp.net/whaggard/archive/2004/08/15/214864.aspx" target="_blank">Recusive GetFiles for DirectoryInfo via a C# Iterator</a></b></p> 
<i>I have been working on a project using C# Express and so I have been playing around with some of the new C# 2.0 features. In my project I had a need to get all the files of a particular type in a given directory including all sub-directories. The DirectoryInfo class has a method GetFiles that takes a search pattern (ie "*.exe") but it only searches that directory it doesn't search sub-directories. So I figured this would be a good chance for me to play with these new things called iterators. At any rate I wrote a recursive version of GetFiles using an iterator so that I could do a simple foreach loop to get all the files recursively.</i> </blockquote>
Click on the title of the post to read the entire article...<br />

]]></content:encoded>
    </item>
    <item>
      <title>The email I get...</title>
      <link>https://docs.microsoft.com/archive/blogs/duncanma/the-email-i-get</link>
      <pubDate>Mon, 23 Aug 2004 01:53:00 GMT</pubDate>
      <dc:creator><![CDATA[Duncanma]]></dc:creator>
      <guid
        isPermaLink="false">qa.msdn.wdslab.com/duncanma/2004/08/23/the-email-i-get/</guid>
      <description><![CDATA[Every day I get from 1 to 10 emails asking me various VB questions... some I answer by pointing to a...]]></description>
      <content:encoded><![CDATA[<p>Every day I get from 1 to 10 emails asking me various VB questions... some I answer by pointing to a link, some by providing code, and sometimes I just point people to the newsgroups or forums that exist for this type of question... but this time I thought I'd just post the question and answer into my blog ...</p>
<br />
The Question (edited slightly):<br />
<blockquote>
I just want to ask how to make the string in to proper format..<br />
ex...<br />
input.<br />
gerald<br />
<br />
this must be the output:<br />
Gerald<br />
<br />
and i want it to interactively change when i'm inputing a string in a textbox..
</blockquote>

<p>And the answer is to put this code into the TextChanged event of your textbox;</p>
<blockquote>
<pre>
<font color="Blue" family="Microsoft Sans Serif">Dim</font> ci <font color="Blue" family="Microsoft Sans Serif">As</font> Globalization.CultureInfo = _
    System.Threading.Thread.CurrentThread.CurrentCulture<br />
<br />
<font color="Blue" family="Microsoft Sans Serif">Private</font> <font color="Blue" family="Microsoft Sans Serif">Sub</font> TextBox1_TextChanged(<font color="Blue" family="Microsoft Sans Serif">ByVal</font> sender <font color="Blue" family="Microsoft Sans Serif">As</font> System.<font color="Blue" family="Microsoft Sans Serif">Object</font>, _<br />
        <font color="Blue" family="Microsoft Sans Serif">ByVal</font> e <font color="Blue" family="Microsoft Sans Serif">As</font> System.EventArgs) <font color="Blue" family="Microsoft Sans Serif">Handles</font> TextBox1.TextChanged<br />
    <font color="Blue" family="Microsoft Sans Serif">Dim</font> pos <font color="Blue" family="Microsoft Sans Serif">As</font> <font color="Blue" family="Microsoft Sans Serif">Integer</font> = TextBox1.SelectionStart<br />
    TextBox1.Text = ci.TextInfo.ToTitleCase(TextBox1.Text)<br />
    <font color="Blue" family="Microsoft Sans Serif">If</font> pos > 0 <font color="Blue" family="Microsoft Sans Serif">AndAlso</font> pos &lt;= TextBox1.Text.Length <font color="Blue" family="Microsoft Sans Serif">Then</font><br />
        TextBox1.SelectionStart = pos<br />
    <font color="Blue" family="Microsoft Sans Serif">End</font> <font color="Blue" family="Microsoft Sans Serif">If</font><br />
<font color="Blue" family="Microsoft Sans Serif">End</font> <font color="Blue" family="Microsoft Sans Serif">Sub</font><br />
</pre>
</blockquote>

<p>The key is that the <b><a href="https://msdn.microsoft.com/library/en-us/cpref/html/frlrfSystemGlobalizationCultureInfoClassTopic.asp" target="_blank">CultureInfo</a> </b>class provides a <b><a href="https://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/frlrfsystemglobalizationtextinfoclasstopic.asp" target="_blank">TextInfo</a> </b>instance, which in turn has a method of "<b>ToTitleCase</b>" on it... <a href="https://support.microsoft.com/default.aspx?scid=kb;en-us;312897#3" target="_blank">This KB article</a> provides more info and also shows an alternate method to achieve the same results (<b>StrConv()</b>). </p>
]]></content:encoded>
    </item>
    <item>
      <title>C# 2005 and C# Express Content Up...</title>
      <link>https://docs.microsoft.com/archive/blogs/duncanma/c-2005-and-c-express-content-up</link>
      <pubDate>Thu, 12 Aug 2004 14:28:00 GMT</pubDate>
      <dc:creator><![CDATA[Duncanma]]></dc:creator>
      <guid
        isPermaLink="false">qa.msdn.wdslab.com/duncanma/2004/08/12/c-2005-and-c-express-content-up/</guid>
      <description><![CDATA[Just up... 

Investigating Code Snippet Technology
Andrew W. Troelsen
Intertech...]]></description>
      <content:encoded><![CDATA[Just up... 
<blockquote>
<h4><a href="https://msdn.microsoft.com/vcsharp/default.aspx?pull=/library/en-us/dnvs05/html/codesnippets.asp" target="_blank">Investigating Code Snippet Technology</a></h4>
Andrew W. Troelsen<br />
<a href="www.intertechtraining.com/" target="_blank">Intertech Training</a><br />
<b>Summary: </b>This article explorers the use of Visual Studio 2005 and Visual C# 2005 Express Edition code snippet technologies. Once the reader understands the XML syntax used to represent code snippets, this article examines the process of building and registering custom code expansions with your Microsoft .NET IDE of choice. (21 printed pages)
</blockquote>
and up a few days ago...
<blockquote>
<h4><a href="https://msdn.microsoft.com/vcsharp/default.aspx?pull=/library/en-us/dnvs05/html/usingcsharpexpress.asp" target="_blank">An Introduction to Programming Using Microsoft Visual C# 2005 Express Edition</a></h4>
Andrew W. Troelsen<br />
<a href="www.intertechtraining.com/" target="_blank">Intertech Training</a><br />
<b>Summary: </b>This article introduces programming with the C# language using the Microsoft Visual C# 2005 Express Edition Integrated Development Environment (IDE). Using various example projects, readers will be exposed to several aspects of the C# programming language and key concepts of the .NET platform. (23 printed pages)
</blockquote>]]></content:encoded>
    </item>
    <item>
      <title>Another article preview up... this one is a content rotator for ASP.NET</title>
      <link>https://docs.microsoft.com/archive/blogs/duncanma/another-article-preview-up-this-one-is-a-content-rotator-for-asp-net</link>
      <pubDate>Thu, 12 Aug 2004 02:43:00 GMT</pubDate>
      <dc:creator><![CDATA[Duncanma]]></dc:creator>
      <guid
        isPermaLink="false">qa.msdn.wdslab.com/duncanma/2004/08/12/another-article-preview-up-this-one-is-a-content-rotator-for-asp-net/</guid>
      <description><![CDATA[As I discussed in an earlier post, I wanted to know if people found preview articles useful... and...]]></description>
      <content:encoded><![CDATA[As I discussed in <a href="https://weblogs.asp.net/duncanma/archive/2004/08/05/209654.aspx" target="_blank">an earlier post</a>, I wanted to know if people found preview articles useful... and at least a few people said they did, so here is another one....<br />
<blockquote>
<b><a href="www.duncanmackenzie.net/writing/Previews/ContentRotator/default.aspx" target="_blank">Rotating Is Fun
</a></b><br />
<b>Summary:</b> Duncan Mackenzie describes the creation of a simple &lsquo;content rotator&rsquo; in ASP.NET
</blockquote>
Feedback, via the blog or the feedback link at the bottom of <a href="www.duncanmackenzie.net/writing/Previews/ContentRotator/default.aspx" target="_blank">the article page</a>, is always welcome!]]></content:encoded>
    </item>
    <item>
      <title>vbCity has blogs!?!? Excellent...</title>
      <link>https://docs.microsoft.com/archive/blogs/duncanma/vbcity-has-blogs-excellent</link>
      <pubDate>Thu, 12 Aug 2004 02:18:00 GMT</pubDate>
      <dc:creator><![CDATA[Duncanma]]></dc:creator>
      <guid
        isPermaLink="false">qa.msdn.wdslab.com/duncanma/2004/08/12/vbcity-has-blogs-excellent/</guid>
      <description><![CDATA[Serge Baranovsky, the man behind vbCity, just mentioned to me that they have started hosting...]]></description>
      <content:encoded><![CDATA[<p>Serge Baranovsky, the man behind <a href="vbcity.com/" target="_blank">vbCity</a>, just mentioned to me that they have started hosting blogs... just their staff at the moment, but they have plans to grow... Since vbCity is already one of the best sites for VB developers, this is good news!</p>
<p><a href="blogs.vbcity.com/" target="_blank">blogs.vbcity.com/</a></p>]]></content:encoded>
    </item>
    <item>
      <title>Removing Word's Formatting from text before pasting into .Text or other apps...</title>
      <link>https://docs.microsoft.com/archive/blogs/duncanma/removing-words-formatting-from-text-before-pasting-into-text-or-other-apps</link>
      <pubDate>Thu, 12 Aug 2004 00:59:00 GMT</pubDate>
      <dc:creator><![CDATA[Duncanma]]></dc:creator>
      <guid
        isPermaLink="false">qa.msdn.wdslab.com/duncanma/2004/08/12/removing-words-formatting-from-text-before-pasting-into-text-or-other-apps/</guid>
      <description><![CDATA[The age-old question of 'how do I avoid putting funky Office HTML into my blog postings' came up on...]]></description>
      <content:encoded><![CDATA[The age-old question of 'how do I avoid putting funky Office HTML into my blog postings' came up on an internal email list today, and one of the answers was a pointer to <a href="stevemiller.net/PureText/" target="_blank">stevemiller.net/PureText/</a>, which I had never heard of... but it looks cool!
<blockquote>
<i>"Have you ever copied some text from a web page, a word document, help, etc., and wanted to paste it as simple text into another application without getting all the formatting from the original source? PureText makes this simple. Just copy/cut whatever you want to the clipboard, click on the PureText tray icon, and then paste to any application.  Better yet, you can configure a Hot-Key to convert and paste the text for you.  The pasted text will be pure and free from all formatting."</i>
</blockquote>
<div class="media">(<a href='msdn.microsoft.com/library/en-us/dncodefun/html/code4fun04252003.asp'>Listening To</a>: Simple Lies [<a href="www.windowsmedia.com/mg/search.asp?srch=Endo">Endo</a> / Daredevil])<br></div>]]></content:encoded>
    </item>
    <item>
      <title>I'm thinking about installing .Text into my own web-site...</title>
      <link>https://docs.microsoft.com/archive/blogs/duncanma/im-thinking-about-installing-text-into-my-own-web-site</link>
      <pubDate>Wed, 11 Aug 2004 21:22:00 GMT</pubDate>
      <dc:creator><![CDATA[Duncanma]]></dc:creator>
      <guid
        isPermaLink="false">qa.msdn.wdslab.com/duncanma/2004/08/11/im-thinking-about-installing-text-into-my-own-web-site/</guid>
      <description><![CDATA[And maybe the Forums code too... Nothing against www.asp.net, but I'm just thinking it might be...]]></description>
      <content:encoded><![CDATA[And maybe the Forums code too... Nothing against www.asp.net, but I'm just thinking it might be interesting to host my own blog... moving seems <i>disruptive</i> though, leaving a large number of my posts here, new ones there.... what do you folks think? Have you thought about hosting your own blog... are you already doing it .... would you never leave the collective?]]></content:encoded>
    </item>
  </channel>
</rss>