views:

432

answers:

1

I would love to create a custom on-screen display app for my laptop, seeing as the manufacturer-supplied one is utter garbage. I'm out to write an app that will show things such as volume control, screen brightness, wireless antenna status and so forth. I'm not sure what info I'd need to know to begin creating something like this (interfaces for grabbing key/button presses, system priority, any other relevant data) and wondered if anyone could help point me in the right direction. If possible I'd like to develop it in C#.

For example, when I hold in the "Fn" key on my laptop keyboard and press the "F5" key, the volume is decreased. There is a visual representation of this action by way of an on-screen graphic that shows the current sound level being decreased. I want to replace the native graphic because, well, I just don't like it :D.

+1  A: 

I use AutoHotKey for this purpose. The programming language/framework is kind of oddball but it's very powerful and there are lots of freely available scripts out there that do amazing things (well, amazing when you consider the language ;-). Adam Pash (from LifeHacker.com) has done a lot of good work with AutoHotKey.

I haven't done anything with custom graphics but here's what my volume control code looks like (it's tied to Win-Plus and Win-Minus hotkeys).

#=::
    SoundSetWaveVolume, +5
    Gosub, osd
    Return

#-::
    SoundSetWaveVolume, -5
    Gosub, osd
    Return

;; onscreen display for volume control
osd:
    IfWinNotExist, volume
    {
     Progress, b1, volume:, , volume
    }
    WinSet, Transparent, 220, volume
    SoundGet, Volumelvl, wave, volume
    Transform, Volumelvl,  Round, %Volumelvl%
    Progress, %Volumelvl%, volume: %Volumelvl%`%
    SetTimer, osd_off, 1000
    Return

osd_off:
    Progress, off
jdigital
For now I don't see any reason not to use this app, thanks!
Neitherman