c# - How to capture volume control keys in IBM/Lenovo ThinkPad? -
i have ibm thinkpad notebook , pcmcia sound card.
volume control works integrated sound card. want fix somehow writing small application.
i tried find codes of these keys this:
private void form1_keyup(object sender, keyeventargs e) { labelkeycode.text = e.keycode.tostring(); }
however not working. im not getting codes. looks these keys not part of "keyboard device".
note: code code preview, in application want use winapi global keyboard capture.
how can capture these keys?
edit:
i tried reverse-engineer little, , browsed "hkvolkey.dll" (file ibm hotkey software) dependency walker, found 2 function names there: registervolumehotkey , deregistervolumehotkey.
i think approach wrong. have @ this: disable keyboard globally wpf window
as input keys might registered, not regular input control keys.
maybe of use more direct approach: http://naudio.codeplex.com/
naudio open source .net audio , midi library, containing dozens of useful audio related classes intended speed development of audio related utilities in .net.
i've written small piece of code once mute volumes using naudio: mute windows volume using c#
Comments
Post a Comment