VB.NET is one of my favorite languages. Windows lacks a native Alarm application and this has been the case for quite some time. So here’s me coding a very simple and basic Alarm based on the .NET platform for Windows. I have decided to stick to making a WPF Alarm rather than a WinForms version. That is just because I want to make it look cool without using a lot of external image resources. But I will get to that later.
So here’s how it looks.
So, as you can see, the application design is base basic. Naturally putting it into code did not take much time.
The Biggest Challenge
It was actually a combination of two factors. One was that I was out of touch with .NET for quite some time. So getting back took some time. Second, the nitty Timer control that you can use easily in WinForms was simply not available. A bit of Googling yielded results and I decided to go with an apparently more efficient and beautiful DispatcherTimer object. This was not an user control but a full sub class of System.Windows.Threading. So I assume it’s pretty powerful.
Once that was sorted out, I added a handler to a tick event that I manually created. Then I was set. All I needed to do was get some free sounds. I headed straight here to get some royalty free sound samples that would basically be the Alarming note! Needless to say I added a full blown siren as the default sound. You can change or replace it if you know some simple coding. I will add a user friendly interface to this WPF alarm to choose your own sounds soon though.
The Source Code
I obviously don’t wish to end this here. I would like this to be a WPF Alarm manager where you can set alarms and then attach notes to them as well. I will need to brush up my skills in ADO or something similar. Let me know if you have better ideas than those in the code. I have kept the structure easy to read and use so things remain self explanatory. Also please do let me know in the comments below if you stumble on any bugs that you may face while using this open source WPF Alarm app.