Programming Forums
User Name Password Register
 

RSS Feed
FORUM INDEX | TODAY'S POSTS | UNANSWERED THREADS | ADVANCED SEARCH

Reply
 
Thread Tools Display Modes
Old Dec 1st, 2005, 6:01 PM   #1
slarti
Newbie
 
Join Date: Dec 2005
Posts: 2
Rep Power: 0 slarti is on a distinguished road
Capturing Key commands, then executing command

I want to set a function key to execute a command from the cmd in windows XP. I saw an article similar to this at MSDN but I don't think that this is what I need.



http://support.microsoft.com/default...1&PA=1&SD=HSCH

I like the way it is headed, basically detect when a function key is pressed and then perform an action. Can this be done?
slarti is offline   Reply With Quote
Old Dec 2nd, 2005, 1:46 PM   #2
Rory
Expert Programmer
 
Rory's Avatar
 
Join Date: Jan 2005
Location: London
Posts: 542
Rep Power: 4 Rory is on a distinguished road
Send a message via MSN to Rory
A function key (F1 - F16) has a scan code just like any other, this article is just on capturing presses when an application window has focus. If you want to catch them on a more global level (i.e. when your application does not have focus), you can use DirectInput, windows hotkeys or lower-level keyboard hooks, the latter also allowing you to capture the "action buttons" on media keyboards.
Rory is offline   Reply With Quote
Old Dec 2nd, 2005, 3:13 PM   #3
slarti
Newbie
 
Join Date: Dec 2005
Posts: 2
Rep Power: 0 slarti is on a distinguished road
Thanks for your response. I have just started looking into VB. I am a systems admin with a little web development(php scripting) experience. I find I need to do things that i cannot do with the native admin consoles and would like to learn how to make my own.

Can you recommend a good book on starting Vb that has subjects like this in it?
slarti is offline   Reply With Quote
Reply

Bookmarks

« Previous Thread in Forum | Next Thread in Forum »

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump




DaniWeb IT Discussion Community
All times are GMT -5. The time now is 8:57 PM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC