473,385 Members | 1,542 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Assign Operating system shortcut key to event in program

Hi,

I've made an application that is running in the background - i.e. its not
visible on the screen.

I would like an eventhandler in the program to subscribe to the event that
occurs when, say the windowskey+(some free key) is pressed. A little like the
way you can start the file Explorer from windowskey+E, except that I do not
want to start an app, but invoke an eventhandler in an already running
program.

Is this possible.

Best regards
Jesper, Denmark.
Mar 9 '06 #1
1 2269
You can do a lot of what you want by creating a global hotkey; in .Net, one
way to do this is by re-using the SystemHotkey code from CodeProject (google
SystemHotkey - it should be the top hit: if not, add CodeProject).

I'm not sure if you can hook into the Windows key, but many other
combinations are available; watch out for a known bug (easily fixed) when
using multiple modifier keys (IIRC the bug is in RegisterHotKeys - something
to do with numeric rather than binary addition).

Marc
"Jesper" <Je****@discussions.microsoft.com> wrote in message
news:DC**********************************@microsof t.com...
Hi,

I've made an application that is running in the background - i.e. its not
visible on the screen.

I would like an eventhandler in the program to subscribe to the event that
occurs when, say the windowskey+(some free key) is pressed. A little like
the
way you can start the file Explorer from windowskey+E, except that I do
not
want to start an app, but invoke an eventhandler in an already running
program.

Is this possible.

Best regards
Jesper, Denmark.

Mar 9 '06 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: H?seyin Erg?n | last post by:
for easy of use; is it possible to assign Function keys or other keys as a shotcut. For example, when user presses F2 it will click save button automatically or vice versa. are there ANY way...
25
by: Mike MacSween | last post by:
Yes, I've downloaded and read the FAQ. And searched the archives. I'm just treading a little carefully here because of the caveats about locking myself out of the db forever. Some answers I could...
4
by: Salad | last post by:
A97. If you set a forms properties to ShortcutMenu = No, the entire form is disabled from displaying a shortcut menu. If you set the property to Yes, all controls have a shortcut menu. I have...
0
by: Saper\(ek\) | last post by:
this is a strange behavior of buttons with shortcut keys, when You have a datagrid on a form and some buttons with shortcut keys. When You click on the datagrid (anywhere but the cells, free space,...
4
by: hb | last post by:
Hi, When I add an asp:button (ex: id=btnLog) on home.aspx, I need to create btnLog_Click() event in home.aspx.cs, and also link this event and the button in OnInit() method by adding:...
4
by: Shane | last post by:
I've created a wallpaper changer that I want to start up on system boot. I know that I can put a shortcut for my app in the startup folder. How can I get the install program for my app to add a...
5
by: =?Utf-8?B?RkxEYXZlTQ==?= | last post by:
I'm developing an application that gets data from 100 sources (via telnet connections, but you can think stock quotes from a webservice if you like). I was planning on using the thread pool (25...
3
by: Bill Nguyen | last post by:
I would like a assign a Function key (F8, for example) to invoke a button control click Please help! Thanks Bill
2
by: =?Utf-8?B?SXZvODY=?= | last post by:
Hi, I need ot set hotkeys to my windows application. I want when Word is thea active application and when user press "Ctrl+Alt+T" for example to start my action. I used RegisterHotKey and...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.