Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: C# Word
Is there any way to handle Key press event of already opened word application to handle the idle status and to prompt a message box?
 
Word dosent have any specific Key Press events.. Frown | :(
Posted 31-Jan-12 19:37pm

1 solution

Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

Word handles it's own key press events. Why would you want to add your own ? Surely it depends what part of word has focus, too, I mean, if I press 2 in the text area, I just want to enter a 2, not have you hijack it.
  Permalink  
Comments
ashok1042 at 1-Feb-12 1:24am
   
Thanks for your response Christian!!
 
I need to handle the document's idle status, i mean for who long the document has been idle. So thought of adding a timer and reseting it on every key press and mouse click event.. if the time reaches a certain limit For eg, 20 mins. I want to display a message box saying. "This Document is idle for 20 minutes.. It will automatically close after 5 mins.."
Christian Graus at 1-Feb-12 1:27am
   
A quick google gave me http://support.microsoft.com/kb/302817 which lists all the events word supports. I don't see any that I think will help you, the document changed event is when you change the active document, not when a document is changed.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
0 OriginalGriff 195
1 ProgramFOX 130
2 Maciej Los 105
3 Sergey Alexandrovich Kryukov 105
4 Afzaal Ahmad Zeeshan 82
0 OriginalGriff 6,564
1 Sergey Alexandrovich Kryukov 6,048
2 DamithSL 5,228
3 Manas Bhardwaj 4,717
4 Maciej Los 4,150


Advertise | Privacy | Mobile
Web03 | 2.8.1411022.1 | Last Updated 1 Feb 2012
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100