Keyboard key pressed
-
I have a special keyboard with some special button at the top of the F.. button like (Banking,My Site,Shopping,Volume Up,Volume Down) and things like that. And this keyboard came with the computer (E-Machine) and those special button works only with the Windows 98 version that came with the computer, now i'm on XP (and you can figure that those buttons don't works) and I want to know how can I create a program that I will put in the tray or maybe a service that can detect when I'm pressing the selected button on the keyboard and add an action to it like Process.Start("http://www.google.com"); on the My Site Button. Any suggestion ?? Thanks
-
I have a special keyboard with some special button at the top of the F.. button like (Banking,My Site,Shopping,Volume Up,Volume Down) and things like that. And this keyboard came with the computer (E-Machine) and those special button works only with the Windows 98 version that came with the computer, now i'm on XP (and you can figure that those buttons don't works) and I want to know how can I create a program that I will put in the tray or maybe a service that can detect when I'm pressing the selected button on the keyboard and add an action to it like Process.Start("http://www.google.com"); on the My Site Button. Any suggestion ?? Thanks
You could begin by overriding the
WndProc
method and watch to see the message you send when pressing those special buttons, if at all. You could also try to override theonKeyPress
method as well to see if you get a reaction from Windows. No guarantees here though as I am not exactly sure this would work, just a thought. :) Nick Parker -
You could begin by overriding the
WndProc
method and watch to see the message you send when pressing those special buttons, if at all. You could also try to override theonKeyPress
method as well to see if you get a reaction from Windows. No guarantees here though as I am not exactly sure this would work, just a thought. :) Nick Parker -
protected override void WndProc(ref Message m)
{
// Handle messages, if you don't want to use the base
// implementation return before finishing
switch(m.Message)
{
.....
}base.WndProc(ref m);
}[Edit: The value to use for the case statment can be found in the Windows SDK; best thing you can do is use the "Find in Files" feature and point it at the PlatformSDK/include directory] HTH, James
-
protected override void WndProc(ref Message m)
{
// Handle messages, if you don't want to use the base
// implementation return before finishing
switch(m.Message)
{
.....
}base.WndProc(ref m);
}[Edit: The value to use for the case statment can be found in the Windows SDK; best thing you can do is use the "Find in Files" feature and point it at the PlatformSDK/include directory] HTH, James
hi, i tried to override it using the WM_KEYDOWN like in VC++ but no result, i test my sample app with a listbox so when i'm clicking a key i'm suppose to get his value but no result and something strange it's that i tried to make the same thing but using the OnKeyPressed an no result too , that's strange ... Can you show me the way to do it please ? Thanks a lot James :)
-
protected override void WndProc(ref Message m)
{
// Handle messages, if you don't want to use the base
// implementation return before finishing
switch(m.Message)
{
.....
}base.WndProc(ref m);
}[Edit: The value to use for the case statment can be found in the Windows SDK; best thing you can do is use the "Find in Files" feature and point it at the PlatformSDK/include directory] HTH, James
Thanks James, I just got into work and got the response from BLaZiNiX, you just beat me to it. :-D Nick Parker