From: Ben Bleything Date: 2007-12-31T03:49:34+09:00 Subject: Re: virtual key codes? On Sun, Dec 30, 2007, Pavel Pvl wrote: > sorry! > my internet went out, and didn't really notice because I haven't been > home. so I'm doing this off of my phone. No problem :) > now first off, ill at least consider myself a newbie here, but: > > when I was still toying with programming on XP, I remember VB or c++ > using virtual key codes. > > from my understanding, it's their system of quickly identifying and > sending key strokes. virtual there just saying whether the keys actually > exsist or not. Sure, that makes sense. > whell I need this towards a windows version of my app (linux ver ready) > of course unless theres a better way: > > I need to tell XP to raise the volume as a system command, and possible > maybe even get the current volume. I think there's probably a more direct route to raising the system volume than sending a key stroke... particularly since somewhere that key stroke would have to have been registered as a volume up command. Though I suppose some keyboards come out-of-the-box with that functionality... > -after long research previous, the closest thing I found was sndvol132 > or something, which only loads the vol config gui. (i do have access to > XP) You might look at the win32utils project on Rubyforge: http://win32utils.rubyforge.org/ It contains a library called win32-sound, which appears to be able to set the wave output volume. It's not the master volume, but it might help! Or you might be able to read the code and adapt it to your needs. Cheers! Ben