473,797 Members | 3,096 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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+(som e 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 2291
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****@discuss ions.microsoft. com> wrote in message
news:DC******** *************** ***********@mic rosoft.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+(som e 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
5215
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 of doing this? thanks.
25
5002
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 probably get myself just by trying things out. But don't want to 'play' around too much. I ran the Security Wizard on my system at my office. Did all the usual things, admin -> users, users group have no rights. Assigned rights as required. The...
4
8859
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 a form that I would like a shortcut menu on 1 control and no shortcut on any other control in the form. But the controls that have no shortcut display a default shortcut. Access help states " If you set the ShortcutMenuBar property to a value
0
1749
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, header or something) and press the shortcut key (without the ALT key pressed) button's action is called. You can easyli recreate this by creating a simple project with datagrid and a button with shortcut key (&Delete in the Text property for...
4
2567
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: this.btnLog.Click +=new System.EventHandler(this.btnLog_Click); Now, I need to generate some asp:button dynamically in an asp:table, and assign the event to all buttons. But in
4
2402
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 shortcut for all users. If I do have a shortcut in the startup folder, I can see the current wallpaper before switching to the next wallpaper in the queue after system boot. Is there a way of executing my app before Windows shows
5
2569
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 at a time). I know I would start all 100 at once and as threads finish, a new thread would become available and the next one would start. However, I need to do this over and over (using an app that will run for days or longer). How can I tell...
3
14129
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
2433
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 UnregisterHotKey methods and ovverride WndProc but even when user works with another program different than MS Word and press the shortcut key my action is done. Thanks
0
9538
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10470
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10247
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10214
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9067
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7561
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6803
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5583
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4135
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

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.