Finding Undisposed Objects
An application to find undisposed objects in your .NET application.
Who likes to see an unkempt room? A street littered with garbage? A smelly toilet?
Who likes to see objects go undisposed in managed code?
Hopefully, no one.
Non-deterministic garbage collection in .NET makes it your responsibility to dispose objects, and bad things can happen if you don't do that. Besides the cost of finalization, your application could run out of resources and crash if it happens to consume them in a way that doesn't trigger garbage collection.
But, this article isn't about why you need to call Dispose - it assumes you've already seen The Light. This article is about ways to find objects that did not get disposed.
More...
What's up with BeginInvoke?
Why and when to use Control.BeginInvoke()?
You are developing this shiny new multithreaded .NET application that has this spanking new UI. You are done coding and it's time for giving a demo to your boss. And while running the demo, the UI hangs. Just hangs. Damn it, you say, it was working fine on my PC. You go back to your source and try to figure out why that happened. After a lot of poking around/debugging/swearing, you notice that you call this simple property on a control and it never returns. Or sometimes, it returns, but doesn't update the UI correctly. You then read something about calling BeginInvoke. What's that, you wonder. This article will try to answer that. Note that this article will be dealing with the BeginInvoke method on the System.Windows.Forms.Control and not the BeginInvoke method that can be called on delegates to run them asynchronously.
More...
ShellControl - A console emulation control
A .NET Control that emulates a command line UI
Here is a good question for the CodeProject poll. How many of us have wanted to write an interpreter for a language of our own? I'm sure that would include most of us. All of us who actually tried to write one would have written it as a command line application. What if I wanted to embed it in a Windows application? Out of that question was born this control, which I call the ShellControl. It has nothing to do with the OS shell, although it can be used as a UI for one. In fact, the sample application does just that, it gets commands from the user, uses cmd.exe to run it, and displays the results in the UI. Think of it as the command tool window in Visual Studio.
More...
TimerGadget - A resumable timer gadget
A Windows Sidebar gadget that provides a simple resumable timer
This gadget is a simple resumable timer with a digital clock face. It also includes a textbox to allow users to add text that could describe what is being timed. The Vista gadget competition and the desire to find how gadgets work were the main motivations for this article.
More...