Geeks With Blogs
Pete's Weblog The Blog Formerly Known as Fun with WinForms October 2003 Entries
Why No Dispose Event?
We all know about resource management in .NET (and Windows Form in particular). I'm talking about using, IDisposable, etc. These constructs work well when you own all the objects that you keep references to, as you simply dispose of each of them from your own Dispose method. But what if you have an object that wraps another object (similar to the decorator pattern)? A Decorator must contain a reference to a ConcreteComponent, but what happens when the ConcreteComponent must be Disposed? Surely we ......

Posted On Monday, October 20, 2003 12:32 PM

Supporting the Tablet PC from Panel - Part IV

In a comment on the original post of this series, Kollen Glynn points out that I could specify a bounding rectangle to the Invalidate() call in the Stroke method. Here's the code for that alteration, as well as some other performance enhancements...

Posted On Saturday, October 18, 2003 8:15 PM

Syntax Colouring of Posted Code

In case anyone was wondering, I've been using Jeff Key's excellent SnippetCompiler to write all the code in this blog. The big advantage with this approach is that I can just select "Export->Html Page..." and copy-paste the resulting HTML.

Posted On Saturday, October 18, 2003 10:04 AM

Supporting the Tablet PC from Panel - Part III

The key problem with the code in my first post is that it renders all strokes the same. Even if they are selected. If you can tolerate this (it doesn't look too bad as you still get the selection frame), then go ahead and use that code. But here's a better way...

Posted On Friday, October 17, 2003 6:40 PM

Supporting the Tablet PC from Panel - Part II

This time I'll be adding a few more properties to the InkPanel, including a way to change the mode of the Ink and some support for changing colours. As an added bonus, I'll add support for separate highlighting including a way to separate the highlights from the ordinary ink.

Posted On Friday, October 17, 2003 5:36 PM

Supporting the Tablet PC from Panel

I recently had the opportunity to watch The .NET Show's latest installment, all about programming for the Tablet PC on .NET. The ease with which they added Ink support to an application in the show inspired me to try it for myself. I started by checking the internet for samples (as you do :) ), and found the Tablet PC Developer website.

Posted On Thursday, October 16, 2003 4:35 PM

Extending RichTextBox - Part III

As promised earlier, I've added the ability to change the background colour of the text. I've also made one or two minor changes to the rest of the code, which I'll detail at the end.

Posted On Wednesday, October 15, 2003 7:33 PM

Mozilla Firebird

Looks like Firebird 0.7 is finally out. Now I just wish I could get the download link to work.

For those that don't know about Firebird.. it's the best web browser available. Go get it now.

Posted On Wednesday, October 15, 2003 2:10 PM

Extending RichTextBox - Part II

Microsoft Word and Visual Studio have one very cool feature in common -- squiggly underlining of errors. As of richedit 3.0 (distributed with Windows 2000 and higher, possibly also with ME) we can get these in the RichTextBox. Actually, we can get a lot more underline styles than that...

Posted On Wednesday, October 15, 2003 9:19 AM

Extending RichTextBox

I've long since given up on using RichTextBox for a code editor, but while I was investigating its use I came across a number of ways to improve it's functionality. I'll present these here in a series of posts on the subject.. first up is how to speed up the control's updating, as well as adding one little extra formatting option.

Posted On Tuesday, October 14, 2003 5:02 PM

Looks like it's the season for talking about exceptions. Brad Abrams discusses them at some length, and now Joel Spolsky does the same (and with almost the exact opposite opinion). I seem to be cursed with the ability to see both sides of this issue. On the one hand, I like being able to throw an exception whenever an impossible condition comes up in running code (you know, when that if-statement you put in "just in case" goes off completely unexpectedly). On the other hand, I hate having to deal ......

Posted On Tuesday, October 14, 2003 1:18 PM

Introduction and Test Post
Time for a little introduction/test post combo. First, thanks to Jeff for letting me start this blog. Here's some info about me: Name: Peter Vidler Age: 22 Job: None (emails from potential employers are welcome :) ) By nature (and education) I am a programmer. Since I am also unemployed and have lots of free time on my hands, I am currently using that time to play with C# and the .NET framework. Specifically I am most interested in Windows Forms, so you'll be mostly seeing information and links in ......

Posted On Tuesday, October 14, 2003 12:22 PM

Copyright © Pete Vidler | Powered by: