<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>bovendeur.org</title>
	<atom:link href="http://bovendeur.org/feed/" rel="self" type="application/rss+xml" />
	<link>http://bovendeur.org</link>
	<description></description>
	<lastBuildDate>Wed, 25 Jan 2012 10:05:30 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
<xhtml:meta xmlns:xhtml="http://www.w3.org/1999/xhtml" name="robots" content="noindex" />
		<item>
		<title>GridView woes.</title>
		<link>http://bovendeur.org/2012/01/25/gridview-woes/</link>
		<comments>http://bovendeur.org/2012/01/25/gridview-woes/#comments</comments>
		<pubDate>Tue, 24 Jan 2012 23:34:13 +0000</pubDate>
		<dc:creator>r-win</dc:creator>
				<category><![CDATA[ADF]]></category>
		<category><![CDATA[C#]]></category>
		<category><![CDATA[gridview]]></category>
		<category><![CDATA[pager]]></category>
		<category><![CDATA[tbody]]></category>
		<category><![CDATA[tfoot]]></category>
		<category><![CDATA[thead]]></category>

		<guid isPermaLink="false">http://projects.bovendeur.org/2012/01/25/gridview-woes/</guid>
		<description><![CDATA[Today, I was extending the GridView control to support some customization for our ADF framework, when I ran into the following error: The table  must contain row sections in order of header, body, then footer. This error occurred after I had enabled paging. On first hand, it seemed to me that this error was purely [...]]]></description>
			<content:encoded><![CDATA[<p>Today, I was extending the GridView control to support some customization for our <a href="http://www.smartusecase.com">ADF</a> framework, when I ran into the following error:</p>
<h4><em>The table  must contain row sections in order of header, body, then footer.</em></h4>
<p>This error occurred after I had enabled paging. On first hand, it seemed to me that this error was purely bad design, and the results I found on the internet seem to support that thought (e.g. <a href="http://forums.asp.net/t/1330555.aspx/1">this post</a>).</p>
<p><span id="more-60"></span>So I did what other people also tried:</p>
<div class="csharpcode">
<pre class="alt"><span class="kwrd">protected</span> <span class="kwrd">override</span> <span class="kwrd">void</span> OnInit(EventArgs e)</pre>
<pre>{</pre>
<pre class="alt">    UseAccessibleHeader = <span class="kwrd">true</span>;</pre>
<pre>    <span class="kwrd">base</span>.OnInit(e);</pre>
<pre class="alt">}</pre>
</div>
<p>and</p>
<div class="csharpcode">
<pre class="alt"><span class="kwrd">protected</span> <span class="kwrd">override</span> <span class="kwrd">void</span> OnRowCreated(GridViewRowEventArgs e)</pre>
<pre>{</pre>
<pre class="alt">    <span class="kwrd">switch</span> (e.Row.RowType)</pre>
<pre>    {</pre>
<pre class="alt">        <span class="kwrd">case</span> DataControlRowType.Header:</pre>
<pre>            e.Row.TableSection = TableRowSection.TableHeader;</pre>
<pre class="alt">            <span class="kwrd">break</span>;</pre>
<pre>        <span class="kwrd">case</span> DataControlRowType.Footer:</pre>
<pre class="alt">            e.Row.TableSection = TableRowSection.TableFooter;</pre>
<pre>            <span class="kwrd">break</span>;</pre>
<pre class="alt">    }</pre>
<pre>}</pre>
</div>
<p>Since the default TableSection is TableBody, we can skip that one. This seems to work, as long as paging is disabled. The code above will take care of nice wrapped table content in &lt;thead&gt;, &lt;tbody&gt; and &lt;tfoot&gt; tags.</p>
<p>So why is this not working when you enable paging? Apparently .NET adds another section somewhere, and it’s TableSection property has a value which it shouldn’t have. The solution is simple: the RowType of the pager is not Footer, but Pager.</p>
<p>The following code will fix the error, and result in the pager being part of the &lt;tfoot&gt; node:</p>
<div class="csharpcode">
<pre class="alt">        <span class="kwrd">case</span> DataControlRowType.Footer:</pre>
<pre>        <span class="kwrd">case</span> DataControlRowType.Pager:</pre>
<pre class="alt">            e.Row.TableSection = TableRowSection.TableFooter;</pre>
</div>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://bovendeur.org/2012/01/25/gridview-woes/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Updated Download Counter to 1.0</title>
		<link>http://bovendeur.org/2009/01/13/updated-download-counter-to-10/</link>
		<comments>http://bovendeur.org/2009/01/13/updated-download-counter-to-10/#comments</comments>
		<pubDate>Tue, 13 Jan 2009 06:58:36 +0000</pubDate>
		<dc:creator>r-win</dc:creator>
				<category><![CDATA[Projects]]></category>
		<category><![CDATA[WordPress Plugins]]></category>

		<guid isPermaLink="false">http://projects.bovendeur.org/?p=47</guid>
		<description><![CDATA[The downloadcounter is updated again. This time, a problem found by Kerry and fixed by Niuray is added. Thank you both! You can find the new version of the download counter on the download counter page. Reactivation of the plugin is not required with this update, unless you&#8217;ve skipped the previous update (that is, if [...]]]></description>
			<content:encoded><![CDATA[<p>The downloadcounter is updated again. This time, a problem found by Kerry and fixed by Niuray is added. Thank you both! You can find the new version of the download counter on the <a href="../../../../../../2007/07/06/download-counter/">download counter page</a>.</p>
<p>Reactivation of the plugin is not required with this update, unless you&rsquo;ve skipped the previous update (that is, if you&rsquo;re using a version prior to 0.6).</p>
]]></content:encoded>
			<wfw:commentRss>http://bovendeur.org/2009/01/13/updated-download-counter-to-10/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Updated DownloadCounter to v0.6</title>
		<link>http://bovendeur.org/2008/12/01/updated-download-counter-to-version-06/</link>
		<comments>http://bovendeur.org/2008/12/01/updated-download-counter-to-version-06/#comments</comments>
		<pubDate>Mon, 01 Dec 2008 19:21:24 +0000</pubDate>
		<dc:creator>r-win</dc:creator>
				<category><![CDATA[Projects]]></category>
		<category><![CDATA[WordPress Plugins]]></category>

		<guid isPermaLink="false">http://projects.bovendeur.org/?p=38</guid>
		<description><![CDATA[Today, I&#8217;ve released a new version of the download counter. New features include paging on the download log overview, logging of the current user, a PHP&#160;function which returns an array of information about the specified download and some new tags are introduced. After upgrading, you&#8217;ll have to re-activate this plugin! You can find more info [...]]]></description>
			<content:encoded><![CDATA[<p>Today, I&#8217;ve released a new version of the download counter. New features include paging on the download log overview, logging of the current user, a PHP&nbsp;function which returns an array of information about the specified download and some new tags are introduced.</p>
<p>After upgrading, you&#8217;ll have to re-activate this plugin! You can find more info and the download <a href="http://projects.bovendeur.org/2007/07/06/download-counter/">here</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://bovendeur.org/2008/12/01/updated-download-counter-to-version-06/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Updated DownloadCounter</title>
		<link>http://bovendeur.org/2008/10/26/updated-downloadcounter/</link>
		<comments>http://bovendeur.org/2008/10/26/updated-downloadcounter/#comments</comments>
		<pubDate>Sun, 26 Oct 2008 21:58:04 +0000</pubDate>
		<dc:creator>r-win</dc:creator>
				<category><![CDATA[Projects]]></category>
		<category><![CDATA[WordPress Plugins]]></category>
		<category><![CDATA[counter]]></category>
		<category><![CDATA[download]]></category>
		<category><![CDATA[download counter]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[statistical]]></category>
		<category><![CDATA[statistics]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://projects.bovendeur.org/?p=31</guid>
		<description><![CDATA[The downloadcounter is updated again. This time, a request from long ago was added: paging in the download overview. I&#8217;ve also added others options to determine the mime type of a file to prevent wrong downloads, like The Tim has had with his PDF file. You can find the new version of the download counter [...]]]></description>
			<content:encoded><![CDATA[<p>The downloadcounter is updated again. This time, a request from long ago was added: paging in the download overview. I&#8217;ve also added others options to determine the mime type of a file to prevent wrong downloads, like The Tim has had with his PDF file. You can find the new version of the download counter on the <a href="http://projects.bovendeur.org/2007/07/06/download-counter/">download counter page</a>.</p>
<p>Reactivation of the plugin is not required with this update, unless you&#8217;ve skipped the previous update (that is, if you&#8217;re using version 0.3).</p>
]]></content:encoded>
			<wfw:commentRss>http://bovendeur.org/2008/10/26/updated-downloadcounter/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Updated ExtProgressbar</title>
		<link>http://bovendeur.org/2007/10/06/updated-extprogressbar/</link>
		<comments>http://bovendeur.org/2007/10/06/updated-extprogressbar/#comments</comments>
		<pubDate>Sat, 06 Oct 2007 18:45:32 +0000</pubDate>
		<dc:creator>r-win</dc:creator>
				<category><![CDATA[C#]]></category>
		<category><![CDATA[Projects]]></category>

		<guid isPermaLink="false">http://projects.bovendeur.org/2007/10/06/updated-extprogressbar/</guid>
		<description><![CDATA[The demo and source files added to the ExtProgressbar are updated to the correct version. Steve Medley notified me of the fact that he couldn&#8217;t change the orientation of the bar posted with the article. It seemed that the version posted with the article was a (very) old version, so I&#8217;ve updated the files to [...]]]></description>
			<content:encoded><![CDATA[<p>The demo and source files added to the ExtProgressbar are updated to the correct version. Steve Medley notified me of the fact that he couldn&#8217;t change the orientation of the bar posted with the article. It seemed that the version posted with the article was a (very) old version, so I&#8217;ve updated the files to the correct version. Steve, thank you!</p>
<p>Please note, the solution and project files in the archives are for Visual Studio 2008 beta 2.</p>
]]></content:encoded>
			<wfw:commentRss>http://bovendeur.org/2007/10/06/updated-extprogressbar/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Using Team Foundation Server MSSCCI provider with Team Explorer 2008 beta 2</title>
		<link>http://bovendeur.org/2007/10/01/using-team-foundation-server-msscci-provider-with-team-explorer-2008-beta-2/</link>
		<comments>http://bovendeur.org/2007/10/01/using-team-foundation-server-msscci-provider-with-team-explorer-2008-beta-2/#comments</comments>
		<pubDate>Mon, 01 Oct 2007 12:56:43 +0000</pubDate>
		<dc:creator>r-win</dc:creator>
				<category><![CDATA[Team Explorer]]></category>
		<category><![CDATA[TFS]]></category>
		<category><![CDATA[Visual Studio]]></category>

		<guid isPermaLink="false">http://projects.bovendeur.org/2007/10/01/using-team-foundation-server-msscci-provider-with-team-explorer-2008-beta-2/</guid>
		<description><![CDATA[For one client we have a .NET 1.1 application, which can&#8217;t be upgraded at the moment. For that project, I use Visual Studio 2003 with the Team Foundation Server MSSCCI provider. Last week, when my diskspace was running low (again), I decided to uninstall Visual Studio 2005 and Team Explorer 2005. I had already installed [...]]]></description>
			<content:encoded><![CDATA[<p>For one client we have a .NET 1.1 application, which can&#8217;t be upgraded at the moment. For that project, I use Visual Studio 2003 with the Team Foundation Server MSSCCI provider.</p>
<p>Last week, when my diskspace was running low (again), I decided to uninstall Visual Studio 2005 and Team Explorer 2005. I had already installed Visual Studio 2008 beta 2, so I only needed Team Explorer 2008 beta 2. I used the Team Foundation Server 2008 ISO to extract the Team Explorer 2008 beta 2, and installed that version.</p>
<p>When I fired up the .NET 1.1 project, the MSSCCI provider was missing a required assembly: Microsoft.TeamFoundation.VersionControl.Client, version 8.0.0.0, publickeytoken b03f5f7f11d50a3a. Of course, I should have known that Team Explorer 2005 is a requirement for the MSSCCI provider. However, I didn&#8217;t want to install Visual Studio 2005 only for Team Explorer 2005. There should be another way. Luckily, there is.</p>
<p><span id="more-28"></span>The .NET runtime allows redirection between different versions. Since Team Explorer 2008 installs newer assemblies, with version 9.0.0.0, we have to redirect the requests for version 8.0.0.0 to 9.0.0.0. This can be achieved by using a .config file. I created the file TfsMsscciSvr.exe.config in the directory C:Program FilesMicrosoft Team Foundation Server MSSCCI Provider (where my MSSCCI provider is installed, this directory should also contain the file TfsMsscciSvr.exe).</p>
<p>At first, I created the following config file:</p>
<div class="code">&lt;configuration&gt;<br />
&nbsp; &lt;runtime&gt;<br />
&nbsp;&nbsp;&nbsp; &lt;assemblyBinding xmlns=&quot;urn:schemas-microsoft-com:asm.v1&quot; appliesTo=&quot;v2.0.50727&quot;&gt;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;dependentAssembly&gt;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;assemblyIdentity name=&quot;Microsoft.TeamFoundation.VersionControl.Client&quot; <br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; publicKeyToken=&quot;b03f5f7f11d50a3a&quot; /&gt;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;bindingRedirect oldVersion=&quot;8.0.0.0&quot; newVersion=&quot;9.0.0.0&quot; /&gt;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;/dependentAssembly&gt;<br />
&nbsp;&nbsp;&nbsp; &lt;/assemblyBinding&gt;<br />
&nbsp; &lt;/runtime&gt;<br />
&lt;/configuration&gt;</div>
<p>After enabling fusion logging (with fuslogvw.exe), I restarted Visual Studio 2003 and opened the project. Another messagebox popped up, with another missing assembly. The fusionlog showed me that the first assembly was indeed rerouted to the new version, so the assemblyBinding actually works in this case! After changing the config file and restarting Visual Studio 2003, I came up with the following config file:</p>
<div class="code">&lt;configuration&gt;<br />
&nbsp; &lt;runtime&gt;<br />
&nbsp;&nbsp;&nbsp; &lt;assemblyBinding xmlns=&quot;urn:schemas-microsoft-com:asm.v1&quot; appliesTo=&quot;v2.0.50727&quot;&gt;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;dependentAssembly&gt;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;assemblyIdentity name=&quot;Microsoft.TeamFoundation.VersionControl.Client&quot; <br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; publicKeyToken=&quot;b03f5f7f11d50a3a&quot; /&gt;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;bindingRedirect oldVersion=&quot;8.0.0.0&quot; newVersion=&quot;9.0.0.0&quot; /&gt;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;/dependentAssembly&gt;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;dependentAssembly&gt;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;assemblyIdentity name=&quot;Microsoft.TeamFoundation.Client&quot; <br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; publicKeyToken=&quot;b03f5f7f11d50a3a&quot; /&gt;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;bindingRedirect oldVersion=&quot;8.0.0.0&quot; newVersion=&quot;9.0.0.0&quot; /&gt;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;/dependentAssembly&gt;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;dependentAssembly&gt;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;assemblyIdentity name=&quot;Microsoft.TeamFoundation.Common&quot;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; publicKeyToken=&quot;b03f5f7f11d50a3a&quot; /&gt;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;bindingRedirect oldVersion=&quot;8.0.0.0&quot; newVersion=&quot;9.0.0.0&quot; /&gt;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;/dependentAssembly&gt;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;dependentAssembly&gt;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;assemblyIdentity name=&quot;Microsoft.TeamFoundation.VersionControl.Common&quot;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; publicKeyToken=&quot;b03f5f7f11d50a3a&quot; /&gt;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;bindingRedirect oldVersion=&quot;8.0.0.0&quot; newVersion=&quot;9.0.0.0&quot; /&gt;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;/dependentAssembly&gt;<br />
&nbsp;&nbsp;&nbsp; &lt;/assemblyBinding&gt;<br />
&lt;/runtime&gt;<br />
&lt;/configuration&gt;</div>
<p>After this configuration, check out and undo checkout worked flawlessly. However, when trying to check in some workitems, some other assemblies were missing. This time, the requested assemblies were not available in the GAC, so the bindingRedirect trick didn&#8217;t work. After searching for the assemblies on internet, I found out that the missing assemblies were private assemblies of Visual Studio 2005. The beta 2 version of Visual Studio 2008 also had the same private assemblies, so this time, we should also add a codebase to the config file.</p>
<p>The configuration file printed below is my final configuration file.</p>
<div class="code">&lt;configuration&gt;<br />
&nbsp; &lt;runtime&gt;<br />
&nbsp;&nbsp;&nbsp; &lt;assemblyBinding xmlns=&quot;urn:schemas-microsoft-com:asm.v1&quot; appliesTo=&quot;v2.0.50727&quot;&gt;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;dependentAssembly&gt;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;assemblyIdentity name=&quot;Microsoft.TeamFoundation.VersionControl.Client&quot;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; publicKeyToken=&quot;b03f5f7f11d50a3a&quot; /&gt;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;bindingRedirect oldVersion=&quot;8.0.0.0&quot; newVersion=&quot;9.0.0.0&quot; /&gt;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;/dependentAssembly&gt;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;dependentAssembly&gt;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;assemblyIdentity name=&quot;Microsoft.TeamFoundation.Client&quot; <br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; publicKeyToken=&quot;b03f5f7f11d50a3a&quot; /&gt;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;bindingRedirect oldVersion=&quot;8.0.0.0&quot; newVersion=&quot;9.0.0.0&quot; /&gt;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;/dependentAssembly&gt;<br />
&nbsp;&nbsp; &nbsp;&nbsp; &lt;dependentAssembly&gt;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;assemblyIdentity name=&quot;Microsoft.TeamFoundation.Common&quot; <br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; publicKeyToken=&quot;b03f5f7f11d50a3a&quot; /&gt;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;bindingRedirect oldVersion=&quot;8.0.0.0&quot; newVersion=&quot;9.0.0.0&quot; /&gt;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;/dependentAssembly&gt;<br />
&nbsp;&nbsp; &nbsp;&nbsp; &lt;dependentAssembly&gt;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;assemblyIdentity name=&quot;Microsoft.TeamFoundation.VersionControl.Common&quot; <br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; publicKeyToken=&quot;b03f5f7f11d50a3a&quot; /&gt;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;bindingRedirect oldVersion=&quot;8.0.0.0&quot; newVersion=&quot;9.0.0.0&quot; /&gt;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;/dependentAssembly&gt;<br />
&nbsp;&nbsp; &nbsp;&nbsp; &lt;dependentAssembly&gt;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;assemblyIdentity name=&quot;Microsoft.TeamFoundation.WorkItemTracking.Client&quot; <br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; publicKeyToken=&quot;b03f5f7f11d50a3a&quot; /&gt;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;bindingRedirect oldVersion=&quot;8.0.0.0&quot; newVersion=&quot;9.0.0.0&quot; /&gt;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;/dependentAssembly&gt;<br />
&nbsp;&nbsp; &nbsp;&nbsp; &lt;dependentAssembly&gt;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;assemblyIdentity name=&quot;Microsoft.TeamFoundation&quot; <br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; publicKeyToken=&quot;b03f5f7f11d50a3a&quot; /&gt;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;bindingRedirect oldVersion=&quot;8.0.0.0&quot; newVersion=&quot;9.0.0.0&quot; /&gt;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;/dependentAssembly&gt;<br />
&nbsp;&nbsp; &nbsp;&nbsp; &lt;dependentAssembly&gt;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;assemblyIdentity name=&quot;Microsoft.VisualStudio.VirtualTreeGrid&quot; <br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; publicKeyToken=&quot;b03f5f7f11d50a3a&quot; /&gt;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;bindingRedirect oldVersion=&quot;8.0.0.0&quot; newVersion=&quot;9.0.0.0&quot; /&gt;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;/dependentAssembly&gt;<br />
&nbsp;&nbsp; &nbsp;&nbsp; &lt;dependentAssembly&gt;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;assemblyIdentity name=&quot;Microsoft.VisualStudio.TeamFoundation.WorkItemTracking&quot; <br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; publicKeyToken=&quot;b03f5f7f11d50a3a&quot; /&gt;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;bindingRedirect oldVersion=&quot;8.0.0.0&quot; newVersion=&quot;9.0.0.0&quot; /&gt;<br />
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&lt;codeBase href=&quot;C:Program FilesMicrosoft Visual Studio 9.0Common7IDEPrivateAssembliesMicrosoft.VisualStudio.TeamFoundation.WorkItemTracking.dll&quot; version=&quot;9.0.0.0&quot;/&gt;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;/dependentAssembly&gt;<br />
&nbsp;&nbsp; &nbsp;&nbsp; &lt;dependentAssembly&gt;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;assemblyIdentity name=&quot;Microsoft.TeamFoundation.WorkItemTracking.Controls&quot; <br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; publicKeyToken=&quot;b03f5f7f11d50a3a&quot; /&gt;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;bindingRedirect oldVersion=&quot;8.0.0.0&quot; newVersion=&quot;9.0.0.0&quot; /&gt;<br />
&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&lt;codeBase href=&quot;C:Program FilesMicrosoft Visual Studio 9.0Common7IDEPrivateAssembliesMicrosoft.TeamFoundation.WorkItemTracking.Controls.dll&quot; version=&quot;9.0.0.0&quot;/&gt;<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;/dependentAssembly&gt;<br />
&nbsp;&nbsp; &nbsp;&lt;/assemblyBinding&gt;<br />
&nbsp; &lt;/runtime&gt;<br />
&lt;/configuration&gt;</div>
<p>You can also download the file <a href="http://bovendeur.org/downloads/TfsMsscciSvr.exe.config">here</a>.</p>
<hr width="100%" size="2" />
<h2>Final note</h2>
<p>Of course this is not the recommended way to use Team Explorer. I cannot give any guarantee that this will work on your machine, or with your configuration, or with your Team Foundation Server. If you think this can harm your environment in any way, I think you should wait until Microsoft releases a MSSCCI provider for use with Team Explorer 2008. This config file can only be used at your own risk!</p>
]]></content:encoded>
			<wfw:commentRss>http://bovendeur.org/2007/10/01/using-team-foundation-server-msscci-provider-with-team-explorer-2008-beta-2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Redirecting pages to posts</title>
		<link>http://bovendeur.org/2007/07/23/redirect/</link>
		<comments>http://bovendeur.org/2007/07/23/redirect/#comments</comments>
		<pubDate>Mon, 23 Jul 2007 10:39:37 +0000</pubDate>
		<dc:creator>r-win</dc:creator>
				<category><![CDATA[Projects]]></category>
		<category><![CDATA[WordPress Plugins]]></category>

		<guid isPermaLink="false">http://bovendeur.org/2007/07/23/redirect/</guid>
		<description><![CDATA[So nice. After releasing my previous plugin (download counter for wordpress), I found out that I&#8217;ve put a wrong URL in the plugin&#8217;s comment. Therefor, a nice amount of hits found the wrong page for support. An empty page, that is. With only a download link to the latest version, but nothing else. My fault [...]]]></description>
			<content:encoded><![CDATA[<p>So nice. After releasing my previous plugin (download counter for wordpress), I found out that I&#8217;ve put a wrong URL in the plugin&#8217;s comment. Therefor, a nice amount of hits found the wrong page for support. An empty page, that is. With only a download link to the latest version, but nothing else. My fault completely, of course.</p>
<p><span id="more-26"></span></p>
<h3>Background</h3>
<p>I wanted to create a redirection from that post to another post, but that doesn&#8217;t seem possible. Strange, since WordPress does have a redirection possibility; the permalink structure uses this, and my download counter uses this system also. However, adding or removing &quot;normal&quot; page url&#8217;s to this redirection facility is not built into the WordPress administration (or I couldn&#8217;t find it, of course).</p>
<p>Since I really required a redirection from /projects/wp-downloadcounter to the correct page, I&#8217;ve created this plugin for WordPress.</p>
<h3>What does this plugin do</h3>
<p>This plugin redirects a visitor who requests page A to page B. This visitor will be either redirected to page B, or WordPress will just show page B instead of page A. The difference between those two methods is that the first redirection is a so called external redirection, which uses the Location header and thus redirecting the browser to a new page. The second method just changes some internal variables, causing WordPress to show page A. In this case, the visitor has no idea that you&#8217;ve just redirected him.</p>
<h3>Why should I use this?</h3>
<p>When you&#8217;ve just been as stupid as I am ;-) Or when you want your posts to be accessible trough different URL&#8217;s. Or&#8230; (fill it out yourself).</p>
<h3>Installation</h3>
<p>Download the zip-file and extract the wp-redirect directory to you wp-content/plugins directory. Go to the plugins page in your wordpress administration panel, and Activate the Redirect plugin. On Activation, a table with the name [$prefix]redirect gets created. The table will not be removed when deactivating the plugin!</p>
<h3>Management</h3>
<p>After activation, a new page will appear in the Management tab. Choose Management -&gt; Redirect for the redirection screen. Click on Add Redirection to add a new redirection. Enter the url which needs redirecting in the source field, and the redirected url in the destination field. Finally, choose the type of redirection.    <br />If you&#8217;ve entered another host as the destination field, the redirection will always be externally.</p>
<h3>Downloading</h3>
<p>You can download the plugin <a title="wp-redirect.zip" href="http://bovendeur.org/downloads/wp-redirect.zip">here</a>.</p>
<h3>Note</h3>
<p>This plugin is only tested on WordPress 2.2 and 2.3. <a href="http://priceofoil.org/" target="_blank">Adam</a> let me know that this plugin does not work with WordPress 2.0. He found another plugin doing the same thing for the WordPress 1.5 and 2.0 codebase. You can find that plugin <a href="http://blog.taragana.com/index.php/archive/wordpress-plugin-for-permanent-redirection-of-posts-angsumans-permanent-redirector-plugin/" target="_blank">here</a>. </p>
]]></content:encoded>
			<wfw:commentRss>http://bovendeur.org/2007/07/23/redirect/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Updated DownloadCounter</title>
		<link>http://bovendeur.org/2007/07/08/downloadcounter-02/</link>
		<comments>http://bovendeur.org/2007/07/08/downloadcounter-02/#comments</comments>
		<pubDate>Sun, 08 Jul 2007 19:07:15 +0000</pubDate>
		<dc:creator>r-win</dc:creator>
				<category><![CDATA[Projects]]></category>
		<category><![CDATA[WordPress Plugins]]></category>

		<guid isPermaLink="false">http://bovendeur.org/2007/07/08/updated-downloadcounter/</guid>
		<description><![CDATA[Today I&#8217;ve updated the download counter to a new version. The first release seemed to contain a parse error, which is fixed by now. This version also adds a overview of who downloaded which file and when it was downloaded. Also the referer is stored, so you can see where your downloaders are looking for [...]]]></description>
			<content:encoded><![CDATA[<p>Today I&#8217;ve updated the download counter to a new version. The first release seemed to contain a parse error, which is fixed by now.</p>
<p>This version also adds a overview of who downloaded which file and when it was downloaded. Also the referer is stored, so you can see where your downloaders are looking for your files.</p>
<p>You can download the updated version at the <a href="http://bovendeur.org/2007/07/06/download-counter/" title="Download Counter">Download Counter page</a>. Do not forget to re-activate the plugin, to create the new database table.</p>
]]></content:encoded>
			<wfw:commentRss>http://bovendeur.org/2007/07/08/downloadcounter-02/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Download Counter for WordPress</title>
		<link>http://bovendeur.org/2007/07/06/download-counter/</link>
		<comments>http://bovendeur.org/2007/07/06/download-counter/#comments</comments>
		<pubDate>Fri, 06 Jul 2007 00:22:04 +0000</pubDate>
		<dc:creator>r-win</dc:creator>
				<category><![CDATA[Projects]]></category>
		<category><![CDATA[WordPress Plugins]]></category>

		<guid isPermaLink="false">http://bovendeur.org/2007/07/06/download-counter/</guid>
		<description><![CDATA[I&#8217;m crazy about numbers. I won&#8217;t do anything with them, but I just like them. Just like to watch counters increase, or graphics to grow. Since WordPress does offer attaching downloads to pages, but doesn&#8217;t keep track of statistical information about these downloads, I wrote this plugin. I should mention statistical information is a big [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m crazy about numbers. I won&#8217;t do anything with them, but I just like them. Just like to watch counters increase, or graphics to grow.  Since WordPress does offer attaching downloads to pages, but doesn&#8217;t keep track of statistical information about these downloads, I wrote this plugin.</p>
<p><span id="more-23"></span></p>
<p>I should mention statistical information is a big word for just another download counter, since that is main purpose of this plugin.</p>
<h3>Features:</h3>
<ul>
<li>Keeps track of the amount of downloads of a certain file.</li>
<li>Keeps track of the last download time</li>
<li>Allows you to reset the counter</li>
<li>Allows you to add counters to both internal and external urls</li>
<li>Can use fancy urls (like /downloads/file.zip)</li>
<li>Can print the amount of downloads, the filesize and the last modified date in a post.</li>
</ul>
<h3>Installation</h3>
<p>Download the zip-file and extract the wp-downloadcounter directory to you wp-content/plugins directory. Go to the plugins page in your wordpress administration panel, and Activate the Download Counter plugin. On Activation, a table with the name [$prefix]downloadstats gets created, and two options will be added. The table nor the options will be removed when deactivating the plugin! After activation, it is important that you update the Permalink Structure. You can do this at your Site administration, under Options. The reason for this update is that after Saving the Permalink Structure page, WordPress will &quot;ask&quot; all the plugins if they want to register some specials URL&#8217;s. The download counter plugin will register the specified download slug as a special url with WordPress. If you don&#8217;t want to do this, you&#8217;ll have to disable Pretty Links.</p>
<h3>Management</h3>
<p>After activating the plugin, you can manage the downloads under Management -&gt; Downloads. Choose Add Download to add a download to the list. In the topmost editbox, you should fill in a unique name, since this name will be used in the created url. In the second editbox you should fill in the target URL. Click Save and the download is added to the list.  The overview window allows you to reset the counters for a download, to edit a download (which will not reset the counters) and to delete a download. Of course, when deleting a download, only the download counter for that download will be removed, the file at the target URL will not be removed.</p>
<h3>Using tags in your posts</h3>
<p>When writing a post or a page, you may want to add the URL or the amount of downloads in your post. Using [ download(downloadname) ] (without the spaces) will be replaced with the download url, [ downloadcounter(downloadname) ] will be replaced with the amount of downloads, [ downloadsize(downloadname) ] will print the size of the download&nbsp;(in GB, MB, kB or B), [ downloadupdated(downloadname) ] will print the last modified date, using the WordPress setting you&#8217;ve specified for the date format. When creating a link, you could, for instance, use &lt;a href=&quot;[ download(file.zip) ]&quot;&gt;Download&lt;/a&gt; (of course, again, without the spaces within the [] brackets).</p>
<p>Finally, when using downloadsize of downloadupdated, you can specify one extra argument. With downloadsize, you&nbsp; can add ,false to prevent the usage of the GB, MB, kB or B postfixes. So, for example, using [ downloadsize(file.zip, false) ] will just display the size in bytes. With downloadupdated, you can enter a PHP&nbsp;date format string as extra argument. For example, [ downloadupdated(file.zip, d-m-Y) ] will display a date like 27-11-2008.</p>
<h3>Retrieving download information from PHP</h3>
<p>Since version 0.6 is it possible to get information about the downloads using PHP, so you can use this information directly in your templates or in you own plugins. Only one function is important at the moment:</p>
<p><code>download_information($download_name, $return_information = DOWNLOAD_URL | DOWNLOAD_AMOUNT)</code></p>
<p>This function will return an array with the requested information. You can specify what information to return by the argument $return_information. The file downloadcounter-options.php contains the correct define statements which can be used. Currently only URL, Amount, Size and Last Modified Date are available.</p>
<p>Using the code</p>
<p><code>$info = download_information(wp-downloadcounter.zip, DOWNLOAD_URL | DOWNLOAD_AMOUNT | DOWNLOAD_SIZE | DOWNLOAD_LASTMODIFIED | DOWNLOAD_LASTDOWNLOAD);<br />
var_dump($info);</code></p>
<p>returns:</p>
<p><code>array(4) { [&quot;url&quot;]=&gt;  string(73) &quot;http://bovendeur.org/downloads/wp-downloadcounter.zip&quot; [&quot;amount&quot;]=&gt;  string(4) &quot;5220&quot; [&quot;size&quot;]=&gt; int() [&quot;lastmodified&quot;]=&gt;  int(1240433734) } </code></p>
<h3>Downloading</h3>
<p>You can download this plugin <a href="http://bovendeur.org/downloads/wp-downloadcounter.zip">here</a> (size 0 B). This plugin has been downloaded 5220 times This file was last updated on 22-04-2009. If you have any comments (nice or not), please don&#8217;t be shy. Post them on this page!</p>
<h3>Important note when upgrading</h3>
<p>Since the database table is altered (a column for storing the user id is added) you&#8217;ll have to re-activate the plugin. Forget to do this, and NO&nbsp;logs will be written to the database!</p>
<p>If you&#8217;re using Pretty Links and are going to update your blog to WordPress 2.7, you&#8217;ll have to press the Save Changes button (without making any changes, read above why) on the Permalinks Settings page again to make this plugin work again. In my setup, I didn&#8217;t find the Permalinks page anywhere in the menu, but entering the url /wordpress/wp-admin/option-permalink.php did the trick.</p>
<h3>Changelog</h3>
<h4>2009-04-22</h4>
<ul>
<li>Added French translation (thanks to Laurent)</li>
<li>Fixed missing strings in the pot file&nbsp;(also thanks to Laurent)</li>
<li>The option Items per Page now also limits the amount of items seen in the Available Downloads list</li>
</ul>
<h4>2009-02-14</h4>
<ul>
<li>Fixed a bug which prevented the statistics to update. The bug was found by a couple of users, but with the help of Chris Bergman we were able to fix this one. The problem was the PHP&nbsp;timelimit, which was expired after the file was sent to the client. Since this plugin writes the statistical information at the end of the script, this part of the script was never executed. Solution is to set the timelimit to 0 before the call to readfile, and reset the timelimit to the configured value after the call to readfile. Chris, thank you for your help on this one!</li>
</ul>
<h4>2009-01-13</h4>
<ul>
<li>Fixed a bug which prevented files from being downloaded. Bug found by Kerry and Niuray, and fixed by Niuray. Original fix (and website) can be found in the comments.</li>
</ul>
<h4>2008-12-03</h4>
<ul>
<li>Fixed some issues with PHP4</li>
<li>Added DOWNLOAD_LASTMODIFIED for use with the download_information function</li>
<li>Added Italian language (thanks to Gianni Diurno).</li>
</ul>
<h4>2008-12-01</h4>
<ul>
<li>Added paging to the Downloads log (as requested by Mike, #<span class="commentauthor"><a href="http://projects.bovendeur.org/2007/07/06/download-counter/#comment-100">44</a>)</span></li>
<li>Added logged on user to Downloads log (as requested by 				<span class="commentauthor">anon</span>, #<a title="Permanent Link to this Comment" class="counter" href="http://projects.bovendeur.org/2007/07/06/download-counter/#comment-93">38</a>)</li>
<li>Added a function (download_information), which returns an array of information about the specified file (as requested by SAn, #<span style="text-decoration: underline;"><a href="http://projects.bovendeur.org/2007/07/06/download-counter/#comment-108">47</a>)</span></li>
<li>Added [ downloadupdated(&lt;downloadname&gt;, &lt;php date format&gt;) ] as possible tag.</li>
<li>Added [ downloadsize(&lt;downloadname&gt; ] as possible tag.</li>
</ul>
<h4>2008-10-26</h4>
<ul>
<li>Added paging to the Available Downloads list.</li>
<li>Added other options to determine the mime type of a file, including the <em>file</em>-command (if it&#8217;s available) and a longer list of hard-coded mime-types.</li>
</ul>
<h4>2008-03-19</h4>
<ul>
<li>Local downloads are now handled by the script, so that the filename can be send to the browser. This should prevent the browser from download .htm or other named files.</li>
<li>Changed some PHP tags which could cause errors on some configurations.</li>
</ul>
<h4>2007-07-08</h4>
<ul>
<li>Fixed bug posted by Steve in the comments (thanx to Dave for submitting the fixes).</li>
<li>Added a second table to store the ip-address, referer and date/time for each download.</li>
<li>Added a configuration section to change the settings.</li>
</ul>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://bovendeur.org/2007/07/06/download-counter/feed/</wfw:commentRss>
		<slash:comments>151</slash:comments>
		</item>
		<item>
		<title>ExtProgressBar</title>
		<link>http://bovendeur.org/2007/07/05/extprogressbar/</link>
		<comments>http://bovendeur.org/2007/07/05/extprogressbar/#comments</comments>
		<pubDate>Wed, 04 Jul 2007 22:28:32 +0000</pubDate>
		<dc:creator>r-win</dc:creator>
				<category><![CDATA[C#]]></category>
		<category><![CDATA[Projects]]></category>

		<guid isPermaLink="false">http://bovendeur.org/2007/07/05/extprogressbar/</guid>
		<description><![CDATA[During the coding and testing of an application for one of my clients, I ran over and over against the wall using the .NET progressbar control. I missed a lot of properties to adjust the progressbar to the design of my application instead of the default Windows look &#8216;n feel. Properties like a smooth indicator, [...]]]></description>
			<content:encoded><![CDATA[<p>During the coding and testing of an application for one of my clients, I ran over and over against the wall using the .NET progressbar control. I missed a lot of properties to adjust the progressbar to the design of my application instead of the default Windows look &#8216;n feel. Properties like a smooth indicator, printing the progress inside the control and more control over the colors of both the background and the progressbar. After searching <a target="_blank" title="CodeProject" href="http://www.codeproject.com">CodeProject</a>, I&#8217;ve found some nice contributions, but none fitted my requirements. That&#8217;s why I wrote my own.<span id="more-20"></span>  My first concern was the replacement of the existing progressbars in my application. Changing them to another progressbar should be as easy as change the declaration and initialization from</p>
<p><code>private System.Windows.Forms.ProgressBar progressBar = new System.Windows.Forms.ProgressBar(); </code></p>
<p>to</p>
<p><code>private ExtControls.ExtProgressBar progressBar = new ExtControls.ExtProgressBar();</code></p>
<p>To reach that goal, I wanted my control to inherit from the .NET progressbar. Unfortunately, Microsoft decided, in all it&#8217;s wisdom, that the ProgressBar  control should become a sealed class. Therefor, I had to create a new control from scratch, which implemented every property and every function of the original .NET progressbar.  <a title="Extended Progressbar" rel="lightbox" href="http://bovendeur.org/wordpress/wp-content/uploads/2007/07/extprogressbar1.jpg"><img border="0" align="right" alt="Extended Progressbar" title="Extended Progressbar" src="http://bovendeur.org/wordpress/wp-content/uploads/2007/07/extprogressbar.thumbnail.jpg" /></a></p>
<p>&nbsp;</p>
<h3>What does it do?</h3>
<p>As you should have guessed by now, the control is capable of drawing a progressbar in a lot of different ways. On the right is a screenshot with some of the possibilities of the control.</p>
<h3>Features</h3>
<ul>
<li>A smooth progressbar, as seen in the first progressbar in the screenshot.</li>
<li>A label inside the progressbar, which uses String.Format to insert the progress in percentages, the actual progress value, the minimum value and the maximum value.</li>
<li>You can define two colors for the text label. One color will be used for the text which is printed inside the progressbar, the other for text which is outside the progressbar.</li>
<li>You can choose from three different brushes: the TextureBrush (progressbar #6 and #9), the GradientBrush (progressbar #2, #4, #5 and #7) and the HatchBrush (progressbar #4 and #5).</li>
<li>You can define the block size and the gap width (progressbar #2 and #3).</li>
<li>Gridlines can be printed inside the progressbar (progressbar #8). You have control over the alignment (top, middle and bottom) as well as over the heights, widths and spacing.</li>
<li>You can define a horizontal or a vertical progressbar (progressbar #5, #9 and #10 are vertical oriented) and two different directions (progressbar #3 is drawn with a right to left direction).</li>
<li>Label can freely rotate (progressbar #9)</li>
</ul>
<h3>Using the control in your code</h3>
<p>The ExtProgressBar control inherits from the Control class. Using it should be as easy as adding a reference to the ExtControls assembly or adding the source files to your own project. After compiling your project, the ExtProgressBar control should show up in your toolbox.</p>
<h3>The code</h3>
<p>One of the most annoying things of the .NET progressbar is the flickering when the bar is repainted. The solution is simple, and SetStyle is the answer. I won&#8217;t go into details here, since there are a lot of articles out there which can explain the usage and working of the following SetStyle call a lot better then I can.</p>
<p><code>SetStyle(ControlStyles.AllPaintingInWmPaint | ControlStyles.UserPaint | ControlStyles.DoubleBuffer | ControlStyles.SupportsTransparentBackColor, true);</code></p>
<p>These four ControlStyles allow me to paint the control completely trough my own code, flickerfree and with a transparent background.</p>
<h3>The properties</h3>
<p>When creating a control which can be used from the toolbox and which has a lot of settings, you&#8217;ll going to need the Properties Window. Therefor, I wanted all the properties to make use of that usefull window. Since my control only uses simple types (like integers, floats, strings, structures and enumerations) we can just use some Attributes here. Typing</p>
<p><code>[Description(&quot;The size of the control in pixels&quot;), Editor(&quot;Size&quot;, typeof(UITypeEditor)),  DefaultValue(typeof(Size), &quot;100, 23&quot;)]</code></p>
<p>above a property was enough to let the property show up in the Properties Window. All properties with the above Attributes defined, will show up in the category &quot;Misc&quot;. If that&#8217;s not what you want, add a CategoryAttribute, like this: </p>
<p><code>[Category(&quot;Layout&quot;)]</code></p>
<h3>Drawing the control</h3>
<p>To draw the control, one could choose between two different approaches. You can attach a delegate to the OnPaint handler, or override the OnPaint method from the Control class. The latter is preferred, because calling a function trough a delegate is generally a little bit slower then calling a overridden one.</p>
<p><code>protected override void OnPaint(PaintEventArgs e) { &nbsp;&nbsp;&nbsp;&nbsp;... }</code></p>
<p>In this function, we draw the control in five steps:</p>
<ol>
<li>Draw the background</li>
<li>Draw the progress indicator</li>
<li>Draw the gridlines</li>
<li>Draw the label</li>
<li>Draw the borders</li>
</ol>
<h4>Drawing the background and progress indicator</h4>
<p>Drawing the background can be done in a few different ways. We can override the OnPaintBackground method, or draw the background in the OnPaint functions. In this case, we draw the background in the OnPaint function, as we&#8217;ve specified earlier using the SetStyle call (AllPaintingInWmPaint). Drawing the background itselft is no high tech programming. In fact, creating a brush and filling a rectangle is all there is to it.</p>
<p><code>Brush brush = GetBrush(...); g.FillRectangle(brush, g.VisibleClipBounds); brush.Dispose();</code></p>
<p>The GetBrush function creates a brush based on the arguments given. The arguments are filled by the properties set at design time. The GetBrush function is used to create all brushes in the control. Check the code if you want to see what it does exactly, but it&#8217;s nothing more then a few switches and if statements. We call the <em>Dispose</em> method manually when we don&#8217;t need the brush anymore, because we wan&#8217;t to free the unmanaged GDI resources immediately.  <a title="ExtProgressBar Demo Project" href="http://bovendeur.org/downloads/extprogressbar_demo.zip">Download demo project ~ 16 kB</a> <a title="ExtProgressBar Solution" href="http://bovendeur.org/downloads/extprogressbar_src.zip">Download source code (control + demo  project) ~ 19 kB</a></p>
<h3>Thanks to</h3>
<ul>
<li>James T. Johnson for his article <a target="_blank" title="Image Rotation in .NET" href="http://www.codeproject.com/csharp/rotateimage.asp">Image Rotation in .NET</a>.</li>
<li>Bob Powell&#8217;s <a target="_blank" title="GDI+ FAQ" href="http://www.bobpowell.net/faqmain.htm">GDI+ FAQ</a>.</li>
<li><a href="http://www.stevemedley.net">Steve Medley</a> for notifyng me of the incorrect version on this website.</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://bovendeur.org/2007/07/05/extprogressbar/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
	</channel>
</rss>

