…meie igapäevast IT’d anna meile igapäev…


Some small utils, part one

Filed under: Isiklikud,Programmeerimine — Sander @ 10:06:29

Like all programmers, I write occasionally a small util – either I need it, someone asked for it or writing the app was an interesting challenge. Most programmers do such utils in command-line version only, but I’ve consciously made such utils as WinForms/Win32 applications – easier and faster to use them not only for me, but for others as well. Not to mention, quite a lot of programmers seem to shy away from UI design – and come up with horrible user interfaces – so, even creating an UI for such small tools can be considered to be a practice.

I’ve decided to start releasing such utils whenever someone might have an interest in them. Files will be in hot.ee server.

All utils are free, naturally, and released under copyleft licence. If I still have it, I will also provide the source code. For some stuff I simply have no source anymore – which isn’t a big loss anyway, as any even remotely competent programmer can rewrite them in less then an hour. Code is usually uncommented, as that really isn’t needed for such small proggies (usually I comment my code quite religiously, tywm). They may not be perfect – but remember, in most cases these are written to be used only once and obviously worked then…


TimeBetween.exe (12 KB, .NET 2.0)
TimeBetween.src.zip (13 KB)

TimeBetween will show the number of days/hours/minutes/seconds/milliseconds between two dates. Number in brackets is the absolute value between those dates.

TimeBetween will use your Windows locale for displaying long dates (ie month names) and comma/point as decimal separator.



UnicodeChar.exe (12 KB, .NET 2.0)UnicodeChar
UnicodeChar.src.zip (12 KB)

UnicodeChar is small app for displaying information about an Unicode/UTF-16 character (note that the two are different – but can be considered to be same for everyday purposes. UTF-16 is also known as “Microsoft Unicode”).

UnicodeChar will show you the UTF-16 hex value (U+00b5 on the screenshot) and UTF-16 decimal value (181).

In case of ASCII/high ASCII characters, decimal value is also the high ASCII code for that character (up to 255). You can type those characters in Windows by holding down left Alt key and typing 0 + decimal value on the numeric keypad. For example, you can type the symbol “µ” with Alt+0181. For all characters, if the registry key HKCU\Control Panel\Input Method\EnableHexNumpad has a value of “1”, holding down Alt and pressing + on the numeric keypad, followed by the hex code, might work.

Next is Unicode block (LowercaseLetter). This simply shows the Unicode block where the symbol belongs, useless for most.

Encoded HTML and URL values might be more useful – but if you click on the link, FileFormat.info Unicode information page for that symbol is opened in your default browser, with far more information about the character then you probably need or want.


OpenCloseTray.exe (44 KB, .NET 2.0)

I was asked for this in an Estonian forum – an utility to open and close a CD/DVD tray.

When application starts, you will have to select drive drom the dialog window (see screenshot). If the drive is ready then disc image has Windows logo on it (like X:\ in the screenshot). Click on the image button to select the drive – and then application will minimize to tray. Left-clicking on the icon will open/close the tray, right-click will present a menu. You can run several copies of the application for different drives.

3 kommentaari »

  1. What’s the best programming language in your opinion for writing such kind of utils with proper UI for win32?

    Kommentaar kirjutas wannabe_programmer — 2008-03-27 @ 16:59:25 | Vasta

  2. For Win32? Delphi is definitely the best – simple, powerful, fast. Although, in case of such tiny apps, C++ is as easy. For WinForms (ie .NET), C#.

    Kommentaar kirjutas dukelupus — 2008-03-28 @ 10:01:19 | Vasta

  3. […] Programmeerimine — lawdy @ 10:38:09 Tags: automatic pinging, check website, ping While part one had several utils, this time I have only one, unimaginatively called Website Checker. It is an […]

    Pingback-viide kirjutas Some small utils, part two: Website Checker « …meie igapäevast IT’d anna meile igapäev… — 2008-04-15 @ 10:38:48 | Vasta

RSS feed for comments on this post. TrackBack URI

Lisa kommentaar

Täida nõutavad väljad või kliki ikoonile, et sisse logida:

WordPress.com Logo

Sa kommenteerid kasutades oma WordPress.com kontot. Logi välja /  Muuda )

Google photo

Sa kommenteerid kasutades oma Google kontot. Logi välja /  Muuda )

Twitter picture

Sa kommenteerid kasutades oma Twitter kontot. Logi välja /  Muuda )

Facebook photo

Sa kommenteerid kasutades oma Facebook kontot. Logi välja /  Muuda )

Connecting to %s

Blog at WordPress.com.