Pete's Weblog

The Blog Formerly Known as Fun with WinForms

  Home  |   Contact  |   Syndication    |   Login
  15 Posts | 0 Stories | 50 Comments | 98 Trackbacks

News

Tag Cloud


Archives

Post Categories

.NET Programming

Software

Weblogs

October 2003 Entries

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...
  • Share This Post:
  • Share on Twitter
  • Share on Facebook
  • Share on Technorati

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...

  • Share This Post:
  • Share on Twitter
  • Share on Facebook
  • Share on Technorati

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
  • Share This Post:
  • Share on Twitter
  • Share on Facebook
  • Share on Technorati

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...

  • Share This Post:
  • Share on Twitter
  • Share on Facebook
  • Share on Technorati

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.

  • Share This Post:
  • Share on Twitter
  • Share on Facebook
  • Share on Technorati

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.

  • Share This Post:
  • Share on Twitter
  • Share on Facebook
  • Share on Technorati

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.

  • Share This Post:
  • Share on Twitter
  • Share on Facebook
  • Share on Technorati

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
  • Share This Post:
  • Share on Twitter
  • Share on Facebook
  • Share on Technorati

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...

  • Share This Post:
  • Share on Twitter
  • Share on Facebook
  • Share on Technorati

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.

  • Share This Post:
  • Share on Twitter
  • Share on Facebook
  • Share on Technorati

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...
  • Share This Post:
  • Share on Twitter
  • Share on Facebook
  • Share on Technorati

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...
  • Share This Post:
  • Share on Twitter
  • Share on Facebook
  • Share on Technorati