Monday, April 26, 2004

Odd week. [non tech related]

What a blinkin week it's been. On Monday I fell down stairs and caught my hand on the bannister rail on the way down. I all-but tore the little fnger of my left hand right off. I had to go get it stiched back on again. I suppose I can be thankful that I'm not much of a touch typist and I can adapt back to the old four-finger hunt and peck method. After that, on Wednesday my son Jeremy, who is 14, poked himself in the knuckle with a screwdriver and then went and messed about in the river that runs through our garden. A couple of days later his hand swelled up like a ballon and he was admitted to hospital with a bad dose of blood poisoning. He had to have an operation to clean the hand and save the finger. To cap it all this morning I was head-butted in the face by my daughter's horse, a young stallion who is probably destined for the old snip-snip any time now. Maybe I should just go out and buy a couple of bricks!

Thursday, April 22, 2004

Sunday, April 18, 2004

Freeware, at what cost?

I just had an interesting experience at http://www.toniarts.com, A site that provides a "free" system cleaning utility which came highly recommended on a newsgroup that I frequent. Easyclean, the software in question, is listed on that site has being freeware but before you can download it, supposedly for free, you have to pay a 19.95 membership fee.

Now don't get me wrong, I have no objection to somebody making money through their web site. Indeed, I make my living through my web site, but this particular tactic seems to me to be just a little bit silly. I buy a lot of software online and when a piece of useful software has a fair price tag I'm more than happy to pay if I believe it's going to be worth the money. Sometimes, I pay just because I think the person or product needs the support.

I certainly won't be buying this particular piece of "freeware"

Updated Article

I've just updated the RGB-HSL article to include VB listings of the utility code and the demonstration applications.

Saturday, April 17, 2004

Bogus e-mail

If you don't already know, no-one will ever receive mail from "my staff" or the webmaster at bobpowell.net or anyone else but me personally.

I have seen a bunch of mails proporting to be from the e-mail gateway team at bobpowell.net which have a virus attachment. This is a spoof.

Be very suspicious of all attachments, yes, even Well Formed if you like and use an up-to-date virus scanner at all times.

Mail from me is scanned when sent.

Thursday, April 08, 2004

Whidbey Poll

I was using Whidbey recently and found that Microsoft have changed the way overrides are generated from the IDE. If you override a method the new wizard generates code that doesn't automatically call the base class but throws a NotImplementedExeption instead. I was just wondering what the general opinion of this was?

New Tip: How to find and use the ToolboxBitmap icon in your DLL

One of the more confusing subjects in control design is how to correctly locate and use the icon which is displayed in the toolbox alongside your controls. After some experimentation and finding an apparent error in Microsoft's code I have published the details in the Windows Forms tips and tricks pages.

New Tip: Display a check-box in the property grid for Boolean values.

My Windows Forms tips and tricks page has a new article with code in C# and Visual Basic.net that explains how to draw a check box in the property grid next to boolean values.

New Tip: Display Yes/No instead of True/False

Many people would like the option to display yes or no instead of true and false for boolean values. my Windows Forms tips and tricks page now includes an article with code in C# and Visual Basic.net that explains how to create a type converter to do this job.

Wednesday, April 07, 2004

Updated GDI+ FAQ article

The article on manipulating graphics on screen has been updated to include techniques that enable transformations such as scaling and rotation of the graphics. Any transformation has the potential to upset the mouse input so a method of backtracking the mouse is included. See Manipulate Graphics for details.

Tuesday, March 30, 2004

Bouncy Bouncy!

I'm still getting email bounces on Well Formed subscription deliveries. If you were expecting to receive Well Formed and haven't done so please send me your updated e-mail addresses.

Sunday, March 28, 2004

Well Formed

The latest edition of WellFormed has articles on non-client mouse interactions and two articles on ListView customization that are probably the most detailed on the web. I was researching for the articles and found very scant information so there's a lot of good stuff in there.

Wednesday, March 10, 2004

Binit Shah

Will Binit Shah or Pradip Shah please check your e-mail system because despite having replied to all of your enquiries and sent the issues of Well Formed you ordered you continue to pester me to reply and it's getting a bit wearing.

You seem to be ignoring all my replies, with or without attachments but the mail system does not bounce them, I suspect that you have a lunatic spam filter turned on or have accidentally added me to a list of junk senders.

----------

If anyone has this blog on an RSS feed in the USA could I trouble you to call Mr Shah on his US freefone number to contact him. Mail me and I will reply with an 0800 number to call. I cannot call him because I can't call an 800 number from europe. You can get my e-mail from my site.

Thursday, February 26, 2004

WellFormed released

February's Well Formed is available.

The mail shot has gone out but I have had a lot of bounce notifications this month. Maybe people have their spam systems turned up high.

If you haven't got your copy yet, ping me and let me know.

Thursday, February 05, 2004

Revised article

I updated the article which explains how to capture a control. RelaseDC needed a window handle and an hDC. The old code only had the hDC so a memory leak was caused.

Friday, January 30, 2004

Not polite?

I've just noticed that a few comments have been posted through the HaloScan system which I seem to have had no notification for. Normally when somebody posts a comment I get a mail telling me that it's there but for the last few days and certainly the last few comments made I have had nothing. This may be to do with the recent spate of e-mail viruses and the fact that I've got my Spam checking turned up to its fullest extent so please, if you make a comment and I don't respond straight away, be patient.

Sunday, January 25, 2004

Wednesday, January 14, 2004

Monday, January 12, 2004

ColorMatrix weirdness

Someone asked me a simple question on Saturday that has had me wracking my brains and pulling out my hair over the weekend. They had a problem with an image containing some text which they had tried to invert to a negative but which came out completely black even though the original text was black on a white background. Obviously, it was expected to show white text on a black background. First of all I thought this was a bug and searched around in the code for errors but could find nothing glaringly obvious. Then I sat down and wrote a simple test that loaded up a picture, drew a checkerboard pattern of black squares on top of the picture and made a negative image using the color matrix as described in my GDI+ FAQ article. Imagine my surprise when the negative image had black squares on it instead of cyan ones. I was even more surprised when every graphic I tried came out black in the negative instead of its inverse color. I tried black, white, red, blue, green, yellow and magenta text and graphics and everything came out black in the negative image.

Suddenly, I realized that the common factor with all of these colors is that they all had one or more elements fully saturated or zero with no intermediate values whatsoever. The answer is of course that when using the color matrix to create a negative image color triplet values are multiplied by -1. These values are also eight bit values and so 255 multiplied by -1 is -255 which overflows the 8 bit value to zero. This means that every color with a fully saturated component will be incorrect in the negative and therefore inverting a negative created with this process will produce an incorrect positive.

In an effort to overcome this problem I decided that the solution was to ensure that there were no elements in the image which had fully saturated values or zeros in any of the pixels. To do this I used the color matrix again this time scaling all the colors to make them a tiny bit darker and then shifting all the colors up by one value. This produces positive images which are imperceptibly changed and which produce perfect negatives every time. I am just in the process of updating the GDI+ FAQ with this information and a little bit of code.