Skip to main content
  1. Tags/

Dotnet

Did you know… Visual SourceSafe “Keyword Expansion Support”

·1 min

Although we’re not using SourceSafe at my current project (yet), I found out about a cool feature recently: Keyword Expansion. It enables you to get information about the revision, date, author and so on of the version of the file you are looking at inside the file itself. This way you can see version information in the comments of your code-file, without even starting SourceSafe.

ComboBox trouble

·2 mins

The default ComboBox has some weird characteristics…

We created our own control which derives from the ComboBox because we wanted to create a ComboBox where the user could type (parts of) the value he or she wants to select, but would not be able to type something that was not in the list. So that’s kind of a combination between the DropDownStyles DropDown and DropDownList. The basics weren’t that complicated, so we created the controls pretty fast. But then came the next step: fine-tuning.

HOWTO: display your assembly @ Add Reference

·1 min

You might want to be able to let your assembly show up in the Add Reference window in Visual Studio without the user having to browse for it. When you install your assembly in the GAC, it doesn’t automatically show up in the Add Reference window, because it doesn’t enumerate all assemblies in the GAC. Installing in the GAC only eliminates the need to copy assemblies localy when referencing them. Microsoft doesn’t recommend putting assemblies in the GAC by the way…

A failure occurred writing to the resources file. The system could not find the file specified.

·2 mins

We received the above error for the resx file of a form in our project today. So we checked the existence of the resx file it concerned, and it was there. So maybe the file was corrupt? We deleted the file, removed it from the project and let Visual Studio re-create it by editing the form in the designer. Building the solution gave the same error… again the file was right where it was supposed to be.

A custom SOAP fault handler and a ‘Reference not set to an instance of an object’ error …

·2 mins

Today we had a problem on the project I am working on. To be more precise: I had a problem, the other team members did not.

Quick explanation: We have a server component which uses a web service for some of the functionality we need. Other functionality can be found in a different system which is reachable through IBM WebSphere MQ. The server component is available through remoting, the objects are hosted in IIS. To get decent SOAP errors someone on the team created a custom SOAPFaultHandler and included it in the web.config of the server component. So far so good.

Commenting your code – The sequel

·2 mins

As Ernst put it in the comments: we opened a can of worms here!
In my previous post about Commenting your code, I stated you should not comment your code. Of course, this is nonsense. The reason I stated that, however, isn’t. And I didn’t only say that because I would get some attention 😉

Commenting your code

·2 mins

There are several ways to comment your code. There’s the style where you place comments on the same line as the code. This might get less readable, because there’s some horizontal scrolling involved when your statements get longer. An example:

HOWTO: Draw your own string (URL, copyright) on each displayed picture in an ASP.NET website

·2 mins

The AdRotator .NET provides can be used to show a different image each time a page is visited. You could write a webpage which does this for you, but it’s probably not very useful. Although you need to change the XML file when changing the images to be showed when you use an AdRotator, but that’s not the issue here.
Something .NET doesn’t deliver is a control to add your own text to an image when it is displayed on a webpage. And that’s exactly what we will be doing in this HowTo.

HOWTO: create an animated GIF using .NET (C#)

·2 mins

.NET does not give you possibilities to create animated GIFs through GDI+. At least 1.1 doesn’t, they might incorporate it in 2.0. But there are ways to make them! This solution is one I used myself, and I’m very pleased!