Missing class members ImageList in .NETCF

The code is really simple.

FileStream strm = new FileStream(“CHMIcon.ico”, System.IO.FileMode.Open);
Bitmap bm = new Bitmap(strm);
imgList.Images.Add(bm);

This code compiled great. But when I tried to run it, I got exceptions such as not enough memory. I checked the icon file and it was around 3Kb. I googled for it and I didn’t get any straight answers. I finally decided to change the icon to jpg format instead and low and behold, everything started working perfectly.

Nobody in Microsoft told us that we cannot load icon files! Well, I tell it to you now, you cannot load ico files using this method. I wasted a couple of hours doing this before I decided to change format. An out of memory exception does not give much information and what the hell, I had my super computer resources available so there was no way it could go out of memory on an emulator. Microsoft needs to improve. Provide it in the MSDN for gods sake.

Hello World in D! – Part 2

As discussed in my post http://www.naresh.se/?p=5, I am trying to do a comparison between programs written in C++ and D. Why I am doing it is a question not to be asked but in any case, I am bored and would like to do something fun. I thought this is the nice way to have […]

Hello World in D!

Recently I came across D programming language. It is the successor of c++ with some Java like features. Since I am a C/C++ lover, I have a stupid feeling when I start coding with either Java or C#. I still will give a try and see how many points does it gain on my scale. […]

VirtualBox virtualization software…

Virtualization and its uses for a normal human being! I was asked by my manager to look into virtualization in detail and how it can be used in our platforms. It is not that I am not aware of what virtualization is and what it can do, it is just that I was too lazy […]

If programming languages were religions…

“If programming languages were religions”
(Inspired by “If programming languages were cars”)

C would be Judaism – it’s old and restrictive, but most of the world is familiar with its laws and respects them. The catch is, you can’t convert into it – you’re either into it from the start, or you will think that it’s insanity. Also, when things go wrong, many people are willing to blame the problems of the world on it.