Originally Posted by WizBang
OK, I threw together a quick sample. I make little claims as to the optimization, but it looks pretty good to me. I used API calls for most of it, so hopefully the rewrite and thus comparison to .net should be fair. It tiles a bitmap over the form when you click on it, and gives the number of ticks in the TitleBar. So the larger the form, the longer it takes. Since it would normally not take long enough to really be meaningful, I just used a loop to multiply the number of calls to BitBlt. The number of redundant calls is determined by the value in a TextBox, so it can easily be adjusted for the machine it runs on.
Whomever wants to rewrite it in .net, go right ahead, and post the results. Obviously the same machine is going to need to run both versions to make a comparison.