473,404 Members | 2,195 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,404 software developers and data experts.

assign local application hotkeys

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
Aug 21 '07 #1
2 2418
Hi Ivo,
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.
Ctrl+Alt+T is a shortcut key in Word 2003 at least, I'd assume in other
recent versions as well. When in Word and when pressing the keyboard
shortcut, what happens? Does anything happen in Word?

Secondly, are you checking the return value of RegisterHotKey? Is it true?

And thirdly, what if you create a shortcut to your C# application (for
example on the desktop) and then on the properties of the shortcut specify
Ctrl+Alt+T as the shortcut key, and then in Word press Ctrl+Alt+T, does you
application start?

--
Regards,

Mr. Jani Järvinen
C# MVP
Helsinki, Finland
ja***@removethis.dystopia.fi
http://www.saunalahti.fi/janij/
Aug 21 '07 #2
Yes Ctrl+Alt+T is a shortcut key in Word but after register it with
RegisterHotKey method my function (this bound to shortcut key) is executing
no mater which is the active window. And RegisterHotKey returns true.
Acording to thirdly i can't find how to specify shortcut key to shortcut icon
on the desktop. The point is that I don't want my application to be started
with shortcut but when it is started and when MS Word is active window to
have my sshortcut keys working. My application is Shered add-in and starts
when word starts.

Thenks

"Jani Järvinen [MVP]" wrote:
Hi Ivo,
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.

Ctrl+Alt+T is a shortcut key in Word 2003 at least, I'd assume in other
recent versions as well. When in Word and when pressing the keyboard
shortcut, what happens? Does anything happen in Word?

Secondly, are you checking the return value of RegisterHotKey? Is it true?

And thirdly, what if you create a shortcut to your C# application (for
example on the desktop) and then on the properties of the shortcut specify
Ctrl+Alt+T as the shortcut key, and then in Word press Ctrl+Alt+T, does you
application start?

--
Regards,

Mr. Jani Järvinen
C# MVP
Helsinki, Finland
ja***@removethis.dystopia.fi
http://www.saunalahti.fi/janij/
Aug 22 '07 #3

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

Similar topics

0
by: skumar | last post by:
I need to access the Tabpages by hotkeys "alt+P" in case of "Principals" as one of the Tabpage. Also i need to underline the word "P" in "Principals" so that user is informed about the hotkey.If...
2
by: Hasan Ammar | last post by:
Is it possible to set up hotkeys using onkeypress? I know it can be done with the usual alphanumeric keys, but what about function keys? or using ctrl/alt combinations? Does anybody have a...
1
by: Matthew Wells | last post by:
How do you prevent someone from using Ctrl+, (ctl + comma) or Ctl + . (Ctl + perios) to get to design view. I have all the normal properites turned off (Access special keys, F!!, etc) but nothing...
3
by: Matthew Wells | last post by:
I'm reposting because an idiot replied without reading the whole message. I've tried autokeys and it isn't working for this combination. Please read on. While in form view, how do you prevent...
2
by: Martin Hjärtmyr | last post by:
I have a program that uses Hotkeys! And they works just fine! I use this hotkeylib:...
3
by: Bernd Eichelsdorf | last post by:
Hi, I would like to add hotkeys to my webapp - it's running on a barcode scanner, that has got a number pad and the keys F1 - F4. I would like to add hotkeys, so that when the user presses F1,...
4
by: Octavius Khan | last post by:
I have an application that runs in the system tray and I use global hotkeys to perform functions. When certain hotkeys are pressed, my system tray application may display a message box and...
4
by: =?Utf-8?B?QWxleGFuZGVy?= | last post by:
Hi! I am new to C#. I read two C# books in the last two days which only covered the basics. And now I am on my third day. The books were really bad, because they did not cover windows applications,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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?
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...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
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...
0
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...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
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...

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.