Monday, April 24, 2006

Captain's Log, Stardate NULL

Today I discovered a need for a data-bound DateTimePicker to support the display and input of NULL values. I remembered reading a blog a short while ago about someone else who had already developed a solution.
 
Google helpfully pointed me to Alexander Shirshov's original solution that I had read before. However I also spotted Claudio Grazioli's solution on Code Project which apparently correct some bugs in Alexander's implementation. I downloaded the source, gave it a try and it works very neatly.
 
If anyone would like the source for the NullableDateTimePicker in VB.NET instead of C# just leave a comment.
 Sunday, April 23, 2006

Request to dock

One of the nice parts of working with the Visual Studio 2005 IDE is the very well implemented window docking system. It now looks like there is a library available to achieve the same results in our own applications:

Deblector

Lutz Roeder... you're the bomb. I've been using .NET Reflector for quite some time now and I love every bit of it. If you aren't using it yet, go get it. However, there is one thing I've always wanted to do with Reflector, use it to debug code. As I recently discovered on Mike Stall's excellent debugging blog someone is working on integrating debugging into Reflector. That someone is Felice Pollano and hopefully Deblector will soon become one of my primary development tools too.
 Saturday, April 22, 2006

Mapping the web

Discovered recently that Windows XP has really good support for WebDAV. This command will map an unused drive letter to a folder shared via HTTP:

net use * http://webdavserver/webdavfolder

It's that easy. Hosting a WebDAV folder is also really easy on any machine with IIS. Just add a virtual directory, point it to your chosen local path and make sure it is browsable.

Bound and gagged

I haven't used much of the built in data binding in .NET yet, preferring to keep things under my own control. However, the current project is using it heavily and I really should get up to speed before it's too late. Here is a small tip that was easy to miss on some of the project's earlier code:

"Try using myBindingSource.ResetCurrentItem instead of myBindingSource.ResetBindings when you need to propagate small data changes throughout an application. It can be much more efficient when you are dealing with big lists."

Scan ahead

In my current project we expect to need to integrate scanning documents into our database. I thought I should do a quick preliminary search on how to control a scanner from a .NET WinForms application. Here are a few links other may find useful: