Entries Tagged ‘C#’

Minimal Web API

For a task at work, I needed a mock WebApi for mimicking behavior of 3rd party API, that is not accessible from my machine. Sure enough I proceeded using line of least possible resistance and selected ASP.NET MVC Web Application template and WebAPI and ended up with bloated project that scared the life out of […]

Windows 10 changes Slovenian locale (at last)

If you are a proud developer of software sold internationally or in Slovenia, you might pay a little attention to this. It has not been noted anywhere of importance and I discovered it by chance when one of the programs I am working on crashed. Versions older than Windows 10 had the following Slovenian date […]

Quick tip: Do proper exception handling

This might be a bit of a d’oh, but if you decide to handle exception, handle it properly. What do I mean by saying “properly”? Have you ever seen code like this?

This code is stupid. Exceptions are a sign of exceptional or unpredicted behaviour. Thus, they should be treated with all seriousness. The […]

Creating transparent CStatic control in MFC

For a side project, I am working on in my spare time since college, I needed to create a splash screen. Finally. Eleven years after version 1.0 and we are thinking splash screen. Anyway, the splash screen must contain a custom image as a background, a progress bar to display how the initialization is progressing […]

Opening new mail window from C# windows application

There are some things that are unreasonably difficult even in this day of age. Well, not exactly difficult. Let’s say programmer unfriendly. For instance, opening a new mail window in your default mail client from windows .NET application. Preferably with address filled in. Google for it and you will get the same answer I did. […]

Win32: Hide to system tray – Part 3

In Part 1 of the series, we have seen how we can hide the application and display an icon in system tray. In Part 2 we have implemented a redisplay of application window upon double click on system tray icon. In Part 3, we will see how we can display a popup menu on left […]

Win32: Hide to system tray – Part 2

In Part 1 of the series, we have seen how we can hide the application and display an icon in system tray. In Part 2 we will build on Part 1 example to see how we can implement a redisplay of application window upon double click on system tray icon. To do that, we need […]

Win32: Hide to system tray – Part 1

I used to code in C++ a lot. And I mean, a lot. For instance, at previous gig, I created an application that measures bandwidth between multiple clients and a server. Interesting project. Specially since three quarters down that road, I had to port it from Windows platform to Linux. But that is entirely different […]

RGB to HEX converter

In my line of work (building intranet business apps), I too commonly encounter a problem of converting RGB numbers to hex value. Sure, I could just use rgb notation, but I prefer a hex one, as it is easier on the eyes and makes CSS shorter. My solution, usually was, to either use a calculator […]

Extending BuildMaster

I might have mentioned, or I might have not, that we have recently started to use BuildMaster as a continuous integration tool. Before continuing, let me make myself clear and say that besides being a satisfied customer of BuildMaster, I have nothing to do with the product itself. Now, with that out of the way, […]