Monthly Archives: April 2013

Still playing with animated Gif images in C#

On this, the last day of my present job (with nothing to do at all), and looking forward to starting the new one, where I may have very little time for blog-writing, to alleviate the boredom I’ve added a bit … Continue reading

Posted in Programming | Tagged , , | Leave a comment

Saving an animated Gif Image with c# in Windows Forms

As mentioned yesterday, you can use the GifEncoder from the Bumpkit class library to save animated Gif image files. In fact, the encoder has no dependencies on the rest of the class library, so I just copied it’s code-file into … Continue reading

Posted in Programming | Tagged , , | Leave a comment

Someone else has already implemented an animated Gif encoder

Sadly, it only shows up on page three of the Google search results for a managed animated Gif image encoder, but it is there! Check out Bumpkit. Now I no longer feel compelled to implement it… Thank goodness. Seriously, the … Continue reading

Posted in Programming | Tagged , , | Leave a comment

Bad code, baaaaad – it hurts my eyes!

There’s a downside to being obsessive, namely, you tend to obsess… Today’s obsession relates to an animated Gif encoder for Windows Forms. Since my PanBox control (PictureBox replacement) used in the application that I have based most of my articles … Continue reading

Posted in Programming | Tagged , , , | Leave a comment

Calling async methods from properties

I noticed that yesterday, someone read my post on Cancellation after searching the web to find out how to call async methods from properties. I am no expert on async code; I’ve just been playing with it for a while … Continue reading

Posted in Programming | Tagged , , | 1 Comment

Async Tasks and cancellation – Not always so easy

A while ago, I explained briefly how I asynchronously populate and cancel thumbnails in the file browser form of my application. But cancellation turned out to be more difficult than I initially thought. That is, if I changed the current … Continue reading

Posted in Programming | Tagged , , , | Leave a comment

Car trouble again – My accelerator is sticking

It’s rather embarrassing to admit, but at first I couldn’t even figure out what was going wrong – all I knew was that when I had the clutch depressed, the car was accelerating as well. Then it just stopped happening … Continue reading

Posted in Uncategorized | Tagged , | Leave a comment

C# numeric sorting revisited

Introduction This is part two of my previous post. Sadly, yesterday I didn’t know I was writing part one. Yesterday evening, having taken my ported StrCmpLogicalW code home, I set out to put it through some more rigorous testing. But … Continue reading

Posted in Programming | Tagged , | Leave a comment

Numeric sort file system names in C#, like Windows Explorer

I was trying to figure out how to do this last night, getting nowhere, and can’t afford to go online the rest of this month, having spent most of my money already… Update: This code has a couple of issues. … Continue reading

Posted in Programming | Tagged , , | 1 Comment

Spot the bug! An example of how to use the TaskCompletionSource<TResult> in C#

I have a habit of making several unrelated changes to projects around the same time. That works out fine in a controlled environment, like at work where there is source control, but it’s not so cool at home where I … Continue reading

Posted in Programming | Tagged , , , | 1 Comment

Thorough error logging is important

I’ve been thinking about writing my next post on my ErrorNotifier class. Actually I’m too lazy to do so now, but in the meanwhile, here is an HTML email that it sent me… (from a Windows service application) I wasn’t … Continue reading

Posted in Programming | Tagged | 1 Comment

Reliably asynchronously reading and writing binary Streams in c# (Always check method call return values)

Every so often, I get brutally reminded not to think I am too clever. Indeed, one thing I’ve learned as a developer is that there is always more to learn, and I should be humble, because tomorrow, I will learn … Continue reading

Posted in Programming | Tagged , , , , | Leave a comment

Comment spam can be amusing

The most recent comment spam on this blog: This is a terrific web site, could you be involved in doing an interview regarding how you designed it? If so e-mail me! Notice that the spammer has actually spelled email correctly, … Continue reading

Posted in Uncategorized | Tagged | Leave a comment

How to download a file with HttpClient in c#

Microsoft recently released a prelease of HttpClient in a portable library via Nuget. But it seems that many developers do not know how to use it. Again, the source, for this and a whole bunch of other stuff, is here: … Continue reading

Posted in Programming | Tagged , , , | 3 Comments