C#: Get current keyboard layout\input language

Get current input language on Windows with C#

On some occasions, you may want to get a "global" input language - that is, the keyboard layout used by the current foreground window\application\whatever. Basically, simulating the behaviour of the language panel on Windows.

The common use cases are on-screen keyboards, fullscreen applications, and widgets.

While I wasn't able to find a premade function that get this particular thing during my searches, it turned out not to be too hard to assemble:

Continue reading

Vector: GameMaker: Studio logo in Windows 8 style

GameMaker: Studio logo in Windows 8 style

This vector icon was originally drawn by me as illustration for one of discussions I was participating in at end of April, which rolled from discussing GameMaker: Studio functionality to discussing it's current logo to making guesses how it could be made better and particularly if Windows 8 - like style would have worked for it. I'm not sure whether this is a good logo generally, but I think it could be useful at times when current 3d-looking Studio logo does not quite fit aesthetically.
To maximize ease of adaptation, scalable vector source file (SVG) is also included here.

Download SVG Download PNG Download HD PNG

(note: as of 2014 or so, GameMaker no longer uses this particular icon, but you can still use this I guess)

Also I've made a GameMaker: Studio HTML5' loading bar extension out of this logo, which looks like this:

Continue reading

Windows 7 – Changing desktop icon label colors

If you've ever disabled casting of shadows by desktop icons in Windows 7 (System - Additional system parameters - Performance), you might have noticed that it's not possible to set actual colour of icon/thumbnail captions.

It is said, that Windows decides that on it's own, judging from image colours (luminance?).

But is it always the right decision?

Probably not. Time to time I get things like these:

However, despite of it being said that this is automatic, there is is a way to influence decision of system on deciding with a colour. And it is actually a simple one.

Continue reading

Time is Ticking (gadget for windows vista/7)

Looks of gadget on desktop, in according pane, and on it's settings screen.

So I've randomly found out that Windows 7 (and Vista too) gadgets are written in HTML+JS+CSS.
Next thing I did was writing my own gadget. So this comes.

'Time is Ticking' is a minimalistic stopwatch. As such, it's purpose is to allow measuring for how long you were doing (or not doing) specific thing. Can be motivating.
Gadget can be considered optimized (does operation and a redraw once per second when on, is entirely idle when off), features customizable backgrounds with ability to specify your own (navigate to %USERPROFILE%\AppData\Local\Microsoft\Windows Sidebar\Gadgets\TimeIsTicking.gadget\image and add 160x32 PNG images to be able to chose them by-name in settings), and is pretty nice-looking overall.
For best experience it is recommended that you have font Dejavu Sans Mono installed, so digits would display appropriately.
To avoid accidental triggering, pause\restart buttons require double-clicking them to react.