<?xml version="1.0" encoding="utf-8"?><!-- generator="wordpress/1.5.1.3" -->
<rss version="2.0" 
	xmlns:content="http://purl.org/rss/1.0/modules/content/">
<channel>
	<title>Comments on: Drawing a selection rubber band like Explorer</title>
	<link>http://www.sturmnet.org/blog/archives/2005/08/26/explorer-rubber-band/</link>
	<description>General musings and programming stuff</description>
	<pubDate>Sat, 22 Nov 2008 10:40:23 +0000</pubDate>
	<generator>http://wordpress.org/?v=1.5.1.3</generator>

	<item>
		<title>by: Oliver Sturm&#8217;s weblog - Drawing a selection rubber band like Explorer - improved</title>
		<link>http://www.sturmnet.org/blog/archives/2005/08/26/explorer-rubber-band/#comment-2710</link>
		<pubDate>Fri, 26 Aug 2005 19:22:46 +0000</pubDate>
		<guid>http://www.sturmnet.org/blog/archives/2005/08/26/explorer-rubber-band/#comment-2710</guid>
					<description>[...] I heard criticism about my first post on the topic: if a control was on the form, apart from the background drawing, the rubber rectangle would appear behind the control, not in front of it. Of course there are several ways to change this, I decided to implement one of them just for fun [...]</description>
		<content:encoded><![CDATA[	<p>[&#8230;] I heard criticism about my first post on the topic: if a control was on the form, apart from the background drawing, the rubber rectangle would appear behind the control, not in front of it. Of course there are several ways to change this, I decided to implement one of them just for fun [&#8230;]
</p>
]]></content:encoded>
				</item>
	<item>
		<title>by: Oliver Sturm</title>
		<link>http://www.sturmnet.org/blog/archives/2005/08/26/explorer-rubber-band/#comment-2709</link>
		<pubDate>Fri, 26 Aug 2005 16:42:28 +0000</pubDate>
		<guid>http://www.sturmnet.org/blog/archives/2005/08/26/explorer-rubber-band/#comment-2709</guid>
					<description>True. I meant that you don't need the InitializeComponent to get my sample to work. I don't care what else you do with your own copy of it :-)</description>
		<content:encoded><![CDATA[	<p>True. I meant that you don&#8217;t need the InitializeComponent to get my sample to work. I don&#8217;t care what else you do with your own copy of it <img src='http://www.sturmnet.org/blog/wp-images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' />
</p>
]]></content:encoded>
				</item>
	<item>
		<title>by: Larry</title>
		<link>http://www.sturmnet.org/blog/archives/2005/08/26/explorer-rubber-band/#comment-2708</link>
		<pubDate>Fri, 26 Aug 2005 16:41:26 +0000</pubDate>
		<guid>http://www.sturmnet.org/blog/archives/2005/08/26/explorer-rubber-band/#comment-2708</guid>
					<description>But, that's exactly what I was doing - designing it in VS 2003.

I added a StatusBar to show the selection rectangle - live!

Without the InitializeComponent(), my new StatusBar was not being instantiated.

Thanks for the sample.</description>
		<content:encoded><![CDATA[	<p>But, that&#8217;s exactly what I was doing - designing it in VS 2003.</p>
	<p>I added a StatusBar to show the selection rectangle - live!</p>
	<p>Without the InitializeComponent(), my new StatusBar was not being instantiated.</p>
	<p>Thanks for the sample.
</p>
]]></content:encoded>
				</item>
	<item>
		<title>by: Oliver Sturm</title>
		<link>http://www.sturmnet.org/blog/archives/2005/08/26/explorer-rubber-band/#comment-2707</link>
		<pubDate>Fri, 26 Aug 2005 16:36:08 +0000</pubDate>
		<guid>http://www.sturmnet.org/blog/archives/2005/08/26/explorer-rubber-band/#comment-2707</guid>
					<description>No, that's not right. You don't need that because the class is a complete derived form in it's own right. You need that only if you are going to design the class in VS, which you might do in a real-world app, but which is not intended for the sample.</description>
		<content:encoded><![CDATA[	<p>No, that&#8217;s not right. You don&#8217;t need that because the class is a complete derived form in it&#8217;s own right. You need that only if you are going to design the class in VS, which you might do in a real-world app, but which is not intended for the sample.
</p>
]]></content:encoded>
				</item>
	<item>
		<title>by: Larry</title>
		<link>http://www.sturmnet.org/blog/archives/2005/08/26/explorer-rubber-band/#comment-2706</link>
		<pubDate>Fri, 26 Aug 2005 16:33:58 +0000</pubDate>
		<guid>http://www.sturmnet.org/blog/archives/2005/08/26/explorer-rubber-band/#comment-2706</guid>
					<description>Also, you must add the following line as the first line of the Form1 constructor:

&lt;code&gt;
&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;InitializeComponent();
&lt;/code&gt;

Probably caused by the partial classes in VS 2005.</description>
		<content:encoded><![CDATA[	<p>Also, you must add the following line as the first line of the Form1 constructor:</p>
	<p><code><br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;InitializeComponent();<br />
</code></p>
	<p>Probably caused by the partial classes in VS 2005.
</p>
]]></content:encoded>
				</item>
	<item>
		<title>by: Oliver Sturm</title>
		<link>http://www.sturmnet.org/blog/archives/2005/08/26/explorer-rubber-band/#comment-2705</link>
		<pubDate>Fri, 26 Aug 2005 16:22:41 +0000</pubDate>
		<guid>http://www.sturmnet.org/blog/archives/2005/08/26/explorer-rubber-band/#comment-2705</guid>
					<description>Larry, you are of course correct. It's unbelievable how many details there are that are easily overlooked after using VS 2005 for a long while :-) Thanks for pointing this out.</description>
		<content:encoded><![CDATA[	<p>Larry, you are of course correct. It&#8217;s unbelievable how many details there are that are easily overlooked after using VS 2005 for a long while <img src='http://www.sturmnet.org/blog/wp-images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' />  Thanks for pointing this out.
</p>
]]></content:encoded>
				</item>
	<item>
		<title>by: Larry</title>
		<link>http://www.sturmnet.org/blog/archives/2005/08/26/explorer-rubber-band/#comment-2704</link>
		<pubDate>Fri, 26 Aug 2005 15:57:53 +0000</pubDate>
		<guid>http://www.sturmnet.org/blog/archives/2005/08/26/explorer-rubber-band/#comment-2704</guid>
					<description>The following lines needed changing for VS 2003:

&lt;pre language=&quot;c#&quot;&gt;
/* using System.Collections.Generic; */ using System.Collections;
/* DoubleBuffered = true; */ SetStyle(ControlStyles.DoubleBuffer &amp;#166; ControlStyles.AllPaintingInWmPaint &amp;#166; ControlStyles.UserPaint, true); 
/* e.Location; */ mouseDownPos = new Point(e.X, e.Y);
&lt;/pre&gt;

And you have to add a Program.cs to the project:

&lt;pre language=&quot;c#&quot;&gt;
using System;
using System.Windows.Forms;

namespace SelectionRectTest
{
  class Program
  {
    [STAThread]
    static public void Main(string[] args) {
      Application.Run(new Form1());
    }
  }
}
&lt;/pre&gt;</description>
		<content:encoded><![CDATA[	<p>The following lines needed changing for VS 2003:</p>
	<pre language="c#">
/* using System.Collections.Generic; */ using System.Collections;
/* DoubleBuffered = true; */ SetStyle(ControlStyles.DoubleBuffer | ControlStyles.AllPaintingInWmPaint | ControlStyles.UserPaint, true);
/* e.Location; */ mouseDownPos = new Point(e.X, e.Y);
</pre>
	<p>And you have to add a Program.cs to the project:</p>
	<pre language="c#">
using System;
using System.Windows.Forms;
	
namespace SelectionRectTest
{
  class Program
  {
    [STAThread]
    static public void Main(string[] args) {
      Application.Run(new Form1());
    }
  }
}
</pre>
]]></content:encoded>
				</item>
</channel>
</rss>
